Source Code
Overview
DEV Balance
0 DEV
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 25 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Request Update | 2255624 | 830 days ago | IN | 0.000115 DEV | 0.00020049 | ||||
Request Update | 2255588 | 830 days ago | IN | 0.000115 DEV | 0.00020049 | ||||
Request Update | 2255554 | 830 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2250531 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2250374 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2250218 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2250130 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2248841 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2247514 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2247208 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2246676 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2246380 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2246241 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2246039 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2245987 | 831 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2245850 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2245687 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2245472 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2245400 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2245084 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2243349 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2241352 | 832 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2240759 | 833 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2240719 | 833 days ago | IN | 0.000115 DEV | 0.00020496 | ||||
Request Update | 2240295 | 833 days ago | IN | 0.000115 DEV | 0.00020496 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
2255624 | 830 days ago | 0 DEV | ||||
2255624 | 830 days ago | 0 DEV | ||||
2255624 | 830 days ago | 0.000115 DEV | ||||
2255624 | 830 days ago | 0 DEV | ||||
2255624 | 830 days ago | 0 DEV | ||||
2255624 | 830 days ago | 0 DEV | ||||
2255624 | 830 days ago | 0 DEV | ||||
2255588 | 830 days ago | 0 DEV | ||||
2255588 | 830 days ago | 0 DEV | ||||
2255588 | 830 days ago | 0.000115 DEV | ||||
2255588 | 830 days ago | 0 DEV | ||||
2255588 | 830 days ago | 0 DEV | ||||
2255588 | 830 days ago | 0 DEV | ||||
2255588 | 830 days ago | 0 DEV | ||||
2255554 | 830 days ago | 0 DEV | ||||
2255554 | 830 days ago | 0 DEV | ||||
2255554 | 830 days ago | 0.000115 DEV | ||||
2255554 | 830 days ago | 0 DEV | ||||
2255554 | 830 days ago | 0 DEV | ||||
2255554 | 830 days ago | 0 DEV | ||||
2255554 | 830 days ago | 0 DEV | ||||
2250531 | 831 days ago | 0 DEV | ||||
2250531 | 831 days ago | 0 DEV | ||||
2250531 | 831 days ago | 0.000115 DEV | ||||
2250531 | 831 days ago | 0 DEV |
Loading...
Loading
Contract Name:
WitnetPriceFeed
Compiler Version
v0.8.11+commit.d7f03943
Contract Source Code (Solidity)
/** *Submitted for verification at moonbase.moonscan.io on 2022-03-09 */ // SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetRequestBoardEvents.sol /// @title Witnet Request Board emitting events interface. /// @author The Witnet Foundation. interface IWitnetRequestBoardEvents { /// Emitted when a Witnet Data Request is posted to the WRB. event PostedRequest(uint256 queryId, address from); /// Emitted when a Witnet-solved result is reported to the WRB. event PostedResult(uint256 queryId, address from); /// Emitted when all data related to given query is deleted from the WRB. event DeletedQuery(uint256 queryId, address from); } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetRequestBoardReporter.sol /// @title The Witnet Request Board Reporter interface. /// @author The Witnet Foundation. interface IWitnetRequestBoardReporter { /// Reports the Witnet-provided result to a previously posted request. /// @dev Will assume `block.timestamp` as the timestamp at which the request was solved. /// @dev Fails if: /// @dev - the `_queryId` is not in 'Posted' status. /// @dev - provided `_drTxHash` is zero; /// @dev - length of provided `_result` is zero. /// @param _queryId The unique identifier of the data request. /// @param _drTxHash The hash of the solving tally transaction in Witnet. /// @param _result The result itself as bytes. function reportResult(uint256 _queryId, bytes32 _drTxHash, bytes calldata _result) external; /// Reports the Witnet-provided result to a previously posted request. /// @dev Fails if: /// @dev - called from unauthorized address; /// @dev - the `_queryId` is not in 'Posted' status. /// @dev - provided `_drTxHash` is zero; /// @dev - length of provided `_result` is zero. /// @param _queryId The unique query identifier /// @param _timestamp The timestamp of the solving tally transaction in Witnet. /// @param _drTxHash The hash of the solving tally transaction in Witnet. /// @param _result The result itself as bytes. function reportResult(uint256 _queryId, uint256 _timestamp, bytes32 _drTxHash, bytes calldata _result) external; } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetRequest.sol /// @title The Witnet Data Request basic interface. /// @author The Witnet Foundation. interface IWitnetRequest { /// A `IWitnetRequest` is constructed around a `bytes` value containing /// a well-formed Witnet Data Request using Protocol Buffers. function bytecode() external view returns (bytes memory); /// Returns SHA256 hash of Witnet Data Request as CBOR-encoded bytes. function hash() external view returns (bytes32); } // File: node_modules\witnet-solidity-bridge\contracts\libs\Witnet.sol library Witnet { /// @notice Witnet function that computes the hash of a CBOR-encoded Data Request. /// @param _bytecode CBOR-encoded RADON. function hash(bytes memory _bytecode) internal pure returns (bytes32) { return sha256(_bytecode); } /// Struct containing both request and response data related to every query posted to the Witnet Request Board struct Query { Request request; Response response; } /// Possible status of a Witnet query. enum QueryStatus { Unknown, Posted, Reported, Deleted } /// Data kept in EVM-storage for every Request posted to the Witnet Request Board. struct Request { IWitnetRequest addr; // The contract containing the Data Request which execution has been requested. address requester; // Address from which the request was posted. bytes32 hash; // Hash of the Data Request whose execution has been requested. uint256 gasprice; // Minimum gas price the DR resolver should pay on the solving tx. uint256 reward; // Escrowed reward to be paid to the DR resolver. } /// Data kept in EVM-storage containing Witnet-provided response metadata and result. struct Response { address reporter; // Address from which the result was reported. uint256 timestamp; // Timestamp of the Witnet-provided result. bytes32 drTxHash; // Hash of the Witnet transaction that solved the queried Data Request. bytes cborBytes; // Witnet-provided result CBOR-bytes to the queried Data Request. } /// Data struct containing the Witnet-provided result to a Data Request. struct Result { bool success; // Flag stating whether the request could get solved successfully, or not. CBOR value; // Resulting value, in CBOR-serialized bytes. } /// Data struct following the RFC-7049 standard: Concise Binary Object Representation. struct CBOR { Buffer buffer; uint8 initialByte; uint8 majorType; uint8 additionalInformation; uint64 len; uint64 tag; } /// Iterable bytes buffer. struct Buffer { bytes data; uint32 cursor; } /// Witnet error codes table. enum ErrorCodes { // 0x00: Unknown error. Something went really bad! Unknown, // Script format errors /// 0x01: At least one of the source scripts is not a valid CBOR-encoded value. SourceScriptNotCBOR, /// 0x02: The CBOR value decoded from a source script is not an Array. SourceScriptNotArray, /// 0x03: The Array value decoded form a source script is not a valid Data Request. SourceScriptNotRADON, /// Unallocated ScriptFormat0x04, ScriptFormat0x05, ScriptFormat0x06, ScriptFormat0x07, ScriptFormat0x08, ScriptFormat0x09, ScriptFormat0x0A, ScriptFormat0x0B, ScriptFormat0x0C, ScriptFormat0x0D, ScriptFormat0x0E, ScriptFormat0x0F, // Complexity errors /// 0x10: The request contains too many sources. RequestTooManySources, /// 0x11: The script contains too many calls. ScriptTooManyCalls, /// Unallocated Complexity0x12, Complexity0x13, Complexity0x14, Complexity0x15, Complexity0x16, Complexity0x17, Complexity0x18, Complexity0x19, Complexity0x1A, Complexity0x1B, Complexity0x1C, Complexity0x1D, Complexity0x1E, Complexity0x1F, // Operator errors /// 0x20: The operator does not exist. UnsupportedOperator, /// Unallocated Operator0x21, Operator0x22, Operator0x23, Operator0x24, Operator0x25, Operator0x26, Operator0x27, Operator0x28, Operator0x29, Operator0x2A, Operator0x2B, Operator0x2C, Operator0x2D, Operator0x2E, Operator0x2F, // Retrieval-specific errors /// 0x30: At least one of the sources could not be retrieved, but returned HTTP error. HTTP, /// 0x31: Retrieval of at least one of the sources timed out. RetrievalTimeout, /// Unallocated Retrieval0x32, Retrieval0x33, Retrieval0x34, Retrieval0x35, Retrieval0x36, Retrieval0x37, Retrieval0x38, Retrieval0x39, Retrieval0x3A, Retrieval0x3B, Retrieval0x3C, Retrieval0x3D, Retrieval0x3E, Retrieval0x3F, // Math errors /// 0x40: Math operator caused an underflow. Underflow, /// 0x41: Math operator caused an overflow. Overflow, /// 0x42: Tried to divide by zero. DivisionByZero, /// Unallocated Math0x43, Math0x44, Math0x45, Math0x46, Math0x47, Math0x48, Math0x49, Math0x4A, Math0x4B, Math0x4C, Math0x4D, Math0x4E, Math0x4F, // Other errors /// 0x50: Received zero reveals NoReveals, /// 0x51: Insufficient consensus in tally precondition clause InsufficientConsensus, /// 0x52: Received zero commits InsufficientCommits, /// 0x53: Generic error during tally execution TallyExecution, /// Unallocated OtherError0x54, OtherError0x55, OtherError0x56, OtherError0x57, OtherError0x58, OtherError0x59, OtherError0x5A, OtherError0x5B, OtherError0x5C, OtherError0x5D, OtherError0x5E, OtherError0x5F, /// 0x60: Invalid reveal serialization (malformed reveals are converted to this value) MalformedReveal, /// Unallocated OtherError0x61, OtherError0x62, OtherError0x63, OtherError0x64, OtherError0x65, OtherError0x66, OtherError0x67, OtherError0x68, OtherError0x69, OtherError0x6A, OtherError0x6B, OtherError0x6C, OtherError0x6D, OtherError0x6E, OtherError0x6F, // Access errors /// 0x70: Tried to access a value from an index using an index that is out of bounds ArrayIndexOutOfBounds, /// 0x71: Tried to access a value from a map using a key that does not exist MapKeyNotFound, /// Unallocated OtherError0x72, OtherError0x73, OtherError0x74, OtherError0x75, OtherError0x76, OtherError0x77, OtherError0x78, OtherError0x79, OtherError0x7A, OtherError0x7B, OtherError0x7C, OtherError0x7D, OtherError0x7E, OtherError0x7F, OtherError0x80, OtherError0x81, OtherError0x82, OtherError0x83, OtherError0x84, OtherError0x85, OtherError0x86, OtherError0x87, OtherError0x88, OtherError0x89, OtherError0x8A, OtherError0x8B, OtherError0x8C, OtherError0x8D, OtherError0x8E, OtherError0x8F, OtherError0x90, OtherError0x91, OtherError0x92, OtherError0x93, OtherError0x94, OtherError0x95, OtherError0x96, OtherError0x97, OtherError0x98, OtherError0x99, OtherError0x9A, OtherError0x9B, OtherError0x9C, OtherError0x9D, OtherError0x9E, OtherError0x9F, OtherError0xA0, OtherError0xA1, OtherError0xA2, OtherError0xA3, OtherError0xA4, OtherError0xA5, OtherError0xA6, OtherError0xA7, OtherError0xA8, OtherError0xA9, OtherError0xAA, OtherError0xAB, OtherError0xAC, OtherError0xAD, OtherError0xAE, OtherError0xAF, OtherError0xB0, OtherError0xB1, OtherError0xB2, OtherError0xB3, OtherError0xB4, OtherError0xB5, OtherError0xB6, OtherError0xB7, OtherError0xB8, OtherError0xB9, OtherError0xBA, OtherError0xBB, OtherError0xBC, OtherError0xBD, OtherError0xBE, OtherError0xBF, OtherError0xC0, OtherError0xC1, OtherError0xC2, OtherError0xC3, OtherError0xC4, OtherError0xC5, OtherError0xC6, OtherError0xC7, OtherError0xC8, OtherError0xC9, OtherError0xCA, OtherError0xCB, OtherError0xCC, OtherError0xCD, OtherError0xCE, OtherError0xCF, OtherError0xD0, OtherError0xD1, OtherError0xD2, OtherError0xD3, OtherError0xD4, OtherError0xD5, OtherError0xD6, OtherError0xD7, OtherError0xD8, OtherError0xD9, OtherError0xDA, OtherError0xDB, OtherError0xDC, OtherError0xDD, OtherError0xDE, OtherError0xDF, // Bridge errors: errors that only belong in inter-client communication /// 0xE0: Requests that cannot be parsed must always get this error as their result. /// However, this is not a valid result in a Tally transaction, because invalid requests /// are never included into blocks and therefore never get a Tally in response. BridgeMalformedRequest, /// 0xE1: Witnesses exceeds 100 BridgePoorIncentives, /// 0xE2: The request is rejected on the grounds that it may cause the submitter to spend or stake an /// amount of value that is unjustifiably high when compared with the reward they will be getting BridgeOversizedResult, /// Unallocated OtherError0xE3, OtherError0xE4, OtherError0xE5, OtherError0xE6, OtherError0xE7, OtherError0xE8, OtherError0xE9, OtherError0xEA, OtherError0xEB, OtherError0xEC, OtherError0xED, OtherError0xEE, OtherError0xEF, OtherError0xF0, OtherError0xF1, OtherError0xF2, OtherError0xF3, OtherError0xF4, OtherError0xF5, OtherError0xF6, OtherError0xF7, OtherError0xF8, OtherError0xF9, OtherError0xFA, OtherError0xFB, OtherError0xFC, OtherError0xFD, OtherError0xFE, // This should not exist: /// 0xFF: Some tally error is not intercepted but should UnhandledIntercept } } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetRequestBoardRequestor.sol /// @title Witnet Requestor Interface /// @notice It defines how to interact with the Witnet Request Board in order to: /// - request the execution of Witnet Radon scripts (data request); /// - upgrade the resolution reward of any previously posted request, in case gas price raises in mainnet; /// - read the result of any previously posted request, eventually reported by the Witnet DON. /// - remove from storage all data related to past and solved data requests, and results. /// @author The Witnet Foundation. interface IWitnetRequestBoardRequestor { /// Retrieves a copy of all Witnet-provided data related to a previously posted request, removing the whole query from the WRB storage. /// @dev Fails if the `_queryId` is not in 'Reported' status, or called from an address different to /// @dev the one that actually posted the given request. /// @param _queryId The unique query identifier. function deleteQuery(uint256 _queryId) external returns (Witnet.Response memory); /// Requests the execution of the given Witnet Data Request in expectation that it will be relayed and solved by the Witnet DON. /// A reward amount is escrowed by the Witnet Request Board that will be transferred to the reporter who relays back the Witnet-provided /// result to this request. /// @dev Fails if: /// @dev - provided reward is too low. /// @dev - provided script is zero address. /// @dev - provided script bytecode is empty. /// @param _addr The address of the IWitnetRequest contract that can provide the actual Data Request bytecode. /// @return _queryId An unique query identifier. function postRequest(IWitnetRequest _addr) external payable returns (uint256 _queryId); /// Increments the reward of a previously posted request by adding the transaction value to it. /// @dev Updates request `gasPrice` in case this method is called with a higher /// @dev gas price value than the one used in previous calls to `postRequest` or /// @dev `upgradeReward`. /// @dev Fails if the `_queryId` is not in 'Posted' status. /// @dev Fails also in case the request `gasPrice` is increased, and the new /// @dev reward value gets below new recalculated threshold. /// @param _queryId The unique query identifier. function upgradeReward(uint256 _queryId) external payable; } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetRequestBoardView.sol /// @title Witnet Request Board info interface. /// @author The Witnet Foundation. interface IWitnetRequestBoardView { /// Estimates the amount of reward we need to insert for a given gas price. /// @param _gasPrice The gas price for which we need to calculate the rewards. function estimateReward(uint256 _gasPrice) external view returns (uint256); /// Returns next query id to be generated by the Witnet Request Board. function getNextQueryId() external view returns (uint256); /// Gets the whole Query data contents, if any, no matter its current status. function getQueryData(uint256 _queryId) external view returns (Witnet.Query memory); /// Gets current status of given query. function getQueryStatus(uint256 _queryId) external view returns (Witnet.QueryStatus); /// Retrieves the whole `Witnet.Request` record referred to a previously posted Witnet Data Request. /// @dev Fails if the `_queryId` is not valid or, if it has been deleted, /// @dev or if the related script bytecode got changed after being posted. /// @param _queryId The unique query identifier. function readRequest(uint256 _queryId) external view returns (Witnet.Request memory); /// Retrieves the serialized bytecode of a previously posted Witnet Data Request. /// @dev Fails if the `_queryId` is not valid or, if it has been deleted, /// @dev or if the related script bytecode got changed after being posted. /// @param _queryId The unique query identifier. function readRequestBytecode(uint256 _queryId) external view returns (bytes memory); /// Retrieves the gas price that any assigned reporter will have to pay when reporting result /// to the referred query. /// @dev Fails if the `_queryId` is not valid or, if it has been deleted, /// @dev or if the related script bytecode got changed after being posted. /// @param _queryId The unique query identifier. function readRequestGasPrice(uint256 _queryId) external view returns (uint256); /// Retrieves the reward currently set for the referred query. /// @dev Fails if the `_queryId` is not valid or, if it has been deleted, /// @dev or if the related script bytecode got changed after being posted. /// @param _queryId The unique query identifier. function readRequestReward(uint256 _queryId) external view returns (uint256); /// Retrieves the whole `Witnet.Response` record referred to a previously posted Witnet Data Request. /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier. function readResponse(uint256 _queryId) external view returns (Witnet.Response memory); /// Retrieves the hash of the Witnet transaction hash that actually solved the referred query. /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier. function readResponseDrTxHash(uint256 _queryId) external view returns (bytes32); /// Retrieves the address that reported the result to a previously-posted request. /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier. function readResponseReporter(uint256 _queryId) external view returns (address); /// Retrieves the Witnet-provided CBOR-bytes result of a previously posted request. /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier. function readResponseResult(uint256 _queryId) external view returns (Witnet.Result memory); /// Retrieves the timestamp in which the result to the referred query was solved by the Witnet DON. /// @dev Fails if the `_queryId` is not in 'Reported' status. /// @param _queryId The unique query identifier. function readResponseTimestamp(uint256 _queryId) external view returns (uint256); } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetRequestParser.sol /// @title The Witnet interface for decoding Witnet-provided request to Data Requests. /// This interface exposes functions to check for the success/failure of /// a Witnet-provided result, as well as to parse and convert result into /// Solidity types suitable to the application level. /// @author The Witnet Foundation. interface IWitnetRequestParser { /// Decode raw CBOR bytes into a Witnet.Result instance. /// @param _cborBytes Raw bytes representing a CBOR-encoded value. /// @return A `Witnet.Result` instance. function resultFromCborBytes(bytes memory _cborBytes) external pure returns (Witnet.Result memory); /// Decode a CBOR value into a Witnet.Result instance. /// @param _cborValue An instance of `Witnet.CBOR`. /// @return A `Witnet.Result` instance. function resultFromCborValue(Witnet.CBOR memory _cborValue) external pure returns (Witnet.Result memory); /// Tell if a Witnet.Result is successful. /// @param _result An instance of Witnet.Result. /// @return `true` if successful, `false` if errored. function isOk(Witnet.Result memory _result) external pure returns (bool); /// Tell if a Witnet.Result is errored. /// @param _result An instance of Witnet.Result. /// @return `true` if errored, `false` if successful. function isError(Witnet.Result memory _result) external pure returns (bool); /// Decode a bytes value from a Witnet.Result as a `bytes` value. /// @param _result An instance of Witnet.Result. /// @return The `bytes` decoded from the Witnet.Result. function asBytes(Witnet.Result memory _result) external pure returns (bytes memory); /// Decode a bytes value from a Witnet.Result as a `bytes32` value. /// @param _result An instance of Witnet.Result. /// @return The `bytes32` decoded from the Witnet.Result. function asBytes32(Witnet.Result memory _result) external pure returns (bytes32); /// Decode an error code from a Witnet.Result as a member of `Witnet.ErrorCodes`. /// @param _result An instance of `Witnet.Result`. /// @return The `CBORValue.Error memory` decoded from the Witnet.Result. function asErrorCode(Witnet.Result memory _result) external pure returns (Witnet.ErrorCodes); /// Generate a suitable error message for a member of `Witnet.ErrorCodes` and its corresponding arguments. /// @dev WARN: Note that client contracts should wrap this function into a try-catch foreseing potential errors generated in this function /// @param _result An instance of `Witnet.Result`. /// @return A tuple containing the `CBORValue.Error memory` decoded from the `Witnet.Result`, plus a loggable error message. function asErrorMessage(Witnet.Result memory _result) external pure returns (Witnet.ErrorCodes, string memory); /// Decode a raw error from a `Witnet.Result` as a `uint64[]`. /// @param _result An instance of `Witnet.Result`. /// @return The `uint64[]` raw error as decoded from the `Witnet.Result`. function asRawError(Witnet.Result memory _result) external pure returns(uint64[] memory); /// Decode a boolean value from a Witnet.Result as an `bool` value. /// @param _result An instance of Witnet.Result. /// @return The `bool` decoded from the Witnet.Result. function asBool(Witnet.Result memory _result) external pure returns (bool); /// Decode a fixed16 (half-precision) numeric value from a Witnet.Result as an `int32` value. /// @dev Due to the lack of support for floating or fixed point arithmetic in the EVM, this method offsets all values. /// by 5 decimal orders so as to get a fixed precision of 5 decimal positions, which should be OK for most `fixed16`. /// use cases. In other words, the output of this method is 10,000 times the actual value, encoded into an `int32`. /// @param _result An instance of Witnet.Result. /// @return The `int128` decoded from the Witnet.Result. function asFixed16(Witnet.Result memory _result) external pure returns (int32); /// Decode an array of fixed16 values from a Witnet.Result as an `int128[]` value. /// @param _result An instance of Witnet.Result. /// @return The `int128[]` decoded from the Witnet.Result. function asFixed16Array(Witnet.Result memory _result) external pure returns (int32[] memory); /// Decode a integer numeric value from a Witnet.Result as an `int128` value. /// @param _result An instance of Witnet.Result. /// @return The `int128` decoded from the Witnet.Result. function asInt128(Witnet.Result memory _result) external pure returns (int128); /// Decode an array of integer numeric values from a Witnet.Result as an `int128[]` value. /// @param _result An instance of Witnet.Result. /// @return The `int128[]` decoded from the Witnet.Result. function asInt128Array(Witnet.Result memory _result) external pure returns (int128[] memory); /// Decode a string value from a Witnet.Result as a `string` value. /// @param _result An instance of Witnet.Result. /// @return The `string` decoded from the Witnet.Result. function asString(Witnet.Result memory _result) external pure returns (string memory); /// Decode an array of string values from a Witnet.Result as a `string[]` value. /// @param _result An instance of Witnet.Result. /// @return The `string[]` decoded from the Witnet.Result. function asStringArray(Witnet.Result memory _result) external pure returns (string[] memory); /// Decode a natural numeric value from a Witnet.Result as a `uint64` value. /// @param _result An instance of Witnet.Result. /// @return The `uint64` decoded from the Witnet.Result. function asUint64(Witnet.Result memory _result) external pure returns(uint64); /// Decode an array of natural numeric values from a Witnet.Result as a `uint64[]` value. /// @param _result An instance of Witnet.Result. /// @return The `uint64[]` decoded from the Witnet.Result. function asUint64Array(Witnet.Result memory _result) external pure returns (uint64[] memory); } // File: node_modules\witnet-solidity-bridge\contracts\WitnetRequestBoard.sol /// @title Witnet Request Board functionality base contract. /// @author The Witnet Foundation. abstract contract WitnetRequestBoard is IWitnetRequestBoardEvents, IWitnetRequestBoardReporter, IWitnetRequestBoardRequestor, IWitnetRequestBoardView, IWitnetRequestParser { receive() external payable { revert("WitnetRequestBoard: no transfers accepted"); } } // File: witnet-solidity-bridge\contracts\UsingWitnet.sol /// @title The UsingWitnet contract /// @dev Witnet-aware contracts can inherit from this contract in order to interact with Witnet. /// @author The Witnet Foundation. abstract contract UsingWitnet { WitnetRequestBoard public immutable witnet; /// Include an address to specify the WitnetRequestBoard entry point address. /// @param _wrb The WitnetRequestBoard entry point address. constructor(WitnetRequestBoard _wrb) { require(address(_wrb) != address(0), "UsingWitnet: zero address"); witnet = _wrb; } /// Provides a convenient way for client contracts extending this to block the execution of the main logic of the /// contract until a particular request has been successfully solved and reported by Witnet. modifier witnetRequestSolved(uint256 _id) { require( _witnetCheckResultAvailability(_id), "UsingWitnet: request not solved" ); _; } /// Check if a data request has been solved and reported by Witnet. /// @dev Contracts depending on Witnet should not start their main business logic (e.g. receiving value from third. /// parties) before this method returns `true`. /// @param _id The unique identifier of a previously posted data request. /// @return A boolean telling if the request has been already resolved or not. Returns `false` also, if the result was deleted. function _witnetCheckResultAvailability(uint256 _id) internal view virtual returns (bool) { return witnet.getQueryStatus(_id) == Witnet.QueryStatus.Reported; } /// Estimate the reward amount. /// @param _gasPrice The gas price for which we want to retrieve the estimation. /// @return The reward to be included when either posting a new request, or upgrading the reward of a previously posted one. function _witnetEstimateReward(uint256 _gasPrice) internal view virtual returns (uint256) { return witnet.estimateReward(_gasPrice); } /// Estimates the reward amount, considering current transaction gas price. /// @return The reward to be included when either posting a new request, or upgrading the reward of a previously posted one. function _witnetEstimateReward() internal view virtual returns (uint256) { return witnet.estimateReward(tx.gasprice); } /// Send a new request to the Witnet network with transaction value as a reward. /// @param _request An instance of `IWitnetRequest` contract. /// @return _id Sequential identifier for the request included in the WitnetRequestBoard. /// @return _reward Current reward amount escrowed by the WRB until a result gets reported. function _witnetPostRequest(IWitnetRequest _request) internal virtual returns (uint256 _id, uint256 _reward) { _reward = _witnetEstimateReward(); _id = witnet.postRequest{value: _reward}(_request); } /// Upgrade the reward for a previously posted request. /// @dev Call to `upgradeReward` function in the WitnetRequestBoard contract. /// @param _id The unique identifier of a request that has been previously sent to the WitnetRequestBoard. /// @return Amount in which the reward has been increased. function _witnetUpgradeReward(uint256 _id) internal virtual returns (uint256) { uint256 _currentReward = witnet.readRequestReward(_id); uint256 _newReward = _witnetEstimateReward(); uint256 _fundsToAdd = 0; if (_newReward > _currentReward) { _fundsToAdd = (_newReward - _currentReward); } witnet.upgradeReward{value: _fundsToAdd}(_id); // Let Request.gasPrice be updated return _fundsToAdd; } /// Read the Witnet-provided result to a previously posted request. /// @param _id The unique identifier of a request that was posted to Witnet. /// @return The result of the request as an instance of `Witnet.Result`. function _witnetReadResult(uint256 _id) internal view virtual returns (Witnet.Result memory) { return witnet.readResponseResult(_id); } /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. /// @param _id The unique identifier of a previously posted request. /// @return The Witnet-provided result to the request. function _witnetDeleteQuery(uint256 _id) internal virtual returns (Witnet.Response memory) { return witnet.deleteQuery(_id); } } // File: node_modules\witnet-solidity-bridge\contracts\requests\WitnetRequestBase.sol abstract contract WitnetRequestBase is IWitnetRequest { /// Contains a well-formed Witnet Data Request, encoded using Protocol Buffers. bytes public override bytecode; /// Returns SHA256 hash of Witnet Data Request as CBOR-encoded bytes. bytes32 public override hash; } // File: witnet-solidity-bridge\contracts\requests\WitnetRequest.sol contract WitnetRequest is WitnetRequestBase { using Witnet for bytes; constructor(bytes memory _bytecode) { bytecode = _bytecode; hash = _bytecode.hash(); } } // File: ado-contracts\contracts\interfaces\IERC2362.sol /** * @dev EIP2362 Interface for pull oracles * https://github.com/adoracles/EIPs/blob/erc-2362/EIPS/eip-2362.md */ interface IERC2362 { /** * @dev Exposed function pertaining to EIP standards * @param _id bytes32 ID of the query * @return int,uint,uint returns the value, timestamp, and status code of query */ function valueFor(bytes32 _id) external view returns(int256,uint256,uint256); } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IERC165.sol /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetPriceRouter.sol /// @title The Witnet Price Router basic interface. /// @dev Guides implementation of price feeds aggregation contracts. /// @author The Witnet Foundation. abstract contract IWitnetPriceRouter is IERC2362 { /// Emitted everytime a currency pair is attached to a new price feed contract /// @dev See https://github.com/adoracles/ADOIPs/blob/main/adoip-0010.md /// @dev to learn how these ids are created. event CurrencyPairSet(bytes32 indexed erc2362ID, IERC165 pricefeed); /// Helper pure function: returns hash of the provided ERC2362-compliant currency pair caption (aka ID). function currencyPairId(string memory) external pure virtual returns (bytes32); /// Returns the ERC-165-compliant price feed contract currently serving /// updates on the given currency pair. function getPriceFeed(bytes32 _erc2362id) external view virtual returns (IERC165); /// Returns human-readable ERC2362-based caption of the currency pair being /// served by the given price feed contract address. /// @dev Should fail if the given price feed contract address is not currently /// @dev registered in the router. function getPriceFeedCaption(IERC165) external view virtual returns (string memory); /// Returns human-readable caption of the ERC2362-based currency pair identifier, if known. function lookupERC2362ID(bytes32 _erc2362id) external view virtual returns (string memory); /// Register a price feed contract that will serve updates for the given currency pair. /// @dev Setting zero address to a currency pair implies that it will not be served any longer. /// @dev Otherwise, should fail if the price feed contract does not support the `IWitnetPriceFeed` interface, /// @dev or if given price feed is already serving another currency pair (within this WitnetPriceRouter instance). function setPriceFeed( IERC165 _pricefeed, uint256 _decimals, string calldata _base, string calldata _quote ) external virtual; /// Returns list of known currency pairs IDs. function supportedCurrencyPairs() external view virtual returns (bytes32[] memory); /// Returns `true` if given pair is currently being served by a compliant price feed contract. function supportsCurrencyPair(bytes32 _erc2362id) external view virtual returns (bool); /// Returns `true` if given price feed contract is currently serving updates to any known currency pair. function supportsPriceFeed(IERC165 _priceFeed) external view virtual returns (bool); } // File: node_modules\@openzeppelin\contracts\utils\Context.sol // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin\contracts\access\Ownable.sol // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: node_modules\witnet-solidity-bridge\contracts\interfaces\IWitnetPriceFeed.sol /// @title The Witnet Price Feed basic interface. /// @dev Guides implementation of active price feed polling contracts. /// @author The Witnet Foundation. interface IWitnetPriceFeed { /// Signals that a new price update request is being posted to the Witnet Request Board event PriceFeeding(address indexed from, uint256 queryId, uint256 extraFee); /// Estimates minimum fee amount in native currency to be paid when /// requesting a new price update. /// @dev Actual fee depends on the gas price of the `requestUpdate()` transaction. /// @param _gasPrice Gas price expected to be paid when calling `requestUpdate()` function estimateUpdateFee(uint256 _gasPrice) external view returns (uint256); /// Returns result of the last valid price update request successfully solved by the Witnet oracle. function lastPrice() external view returns (int256); /// Returns the EVM-timestamp when last valid price was reported back from the Witnet oracle. function lastTimestamp() external view returns (uint256); /// Returns tuple containing last valid price and timestamp, as well as status code of latest update /// request that got posted to the Witnet Request Board. /// @return _lastPrice Last valid price reported back from the Witnet oracle. /// @return _lastTimestamp EVM-timestamp of the last valid price. /// @return _lastDrTxHash Hash of the Witnet Data Request that solved the last valid price. /// @return _latestUpdateStatus Status code of the latest update request. function lastValue() external view returns ( int _lastPrice, uint _lastTimestamp, bytes32 _lastDrTxHash, uint _latestUpdateStatus ); /// Returns identifier of the latest update request posted to the Witnet Request Board. function latestQueryId() external view returns (uint256); /// Returns hash of the Witnet Data Request that solved the latest update request. /// @dev Returning 0 while the latest update request remains unsolved. function latestUpdateDrTxHash() external view returns (bytes32); /// Returns error message of latest update request posted to the Witnet Request Board. /// @dev Returning empty string if the latest update request remains unsolved, or /// @dev if it was succesfully solved with no errors. function latestUpdateErrorMessage() external view returns (string memory); /// Returns status code of latest update request posted to the Witnet Request Board: /// @dev Status codes: /// @dev - 200: update request was succesfully solved with no errors /// @dev - 400: update request was solved with errors /// @dev - 404: update request was not solved yet function latestUpdateStatus() external view returns (uint256); /// Returns `true` if latest update request posted to the Witnet Request Board /// has not been solved yet by the Witnet oracle. function pendingUpdate() external view returns (bool); /// Posts a new price update request to the Witnet Request Board. Requires payment of a fee /// that depends on the value of `tx.gasprice`. See `estimateUpdateFee(uint256)`. /// @dev If previous update request was not solved yet, calling this method again allows /// @dev upgrading the update fee if called with a higher `tx.gasprice` value. function requestUpdate() external payable; /// Tells whether this contract implements the interface defined by `interfaceId`. /// @dev See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] /// @dev to learn more about how these ids are created. function supportsInterface(bytes4) external view returns (bool); } // File: @openzeppelin\contracts\utils\Strings.sol // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File: witnet-solidity-bridge\contracts\examples\WitnetPriceRouter.sol contract WitnetPriceRouter is IWitnetPriceRouter, Ownable { using Strings for uint256; struct Pair { IERC165 pricefeed; uint256 decimals; string base; string quote; } mapping (bytes32 => Pair) internal __pairs; mapping (address => bytes32) internal __pricefeedId_; bytes32[] internal __supportedCurrencyPairs; // ======================================================================== // --- Implementation of 'IERC2362' --------------------------------------- /// Returns last valid price value and timestamp, as well as status of /// the latest update request that got posted to the Witnet Request Board. /// @dev Fails if the given currency pair is not currently supported. /// @param _erc2362id Price pair identifier as specified in https://github.com/adoracles/ADOIPs/blob/main/adoip-0010.md /// @return _lastPrice Last valid price reported back from the Witnet oracle. /// @return _lastTimestamp EVM-timestamp of the last valid price. /// @return _latestUpdateStatus Status code of latest update request that got posted to the Witnet Request Board: /// - 200: latest update request was succesfully solved with no errors /// - 400: latest update request was solved with errors /// - 404: latest update request is still pending to be solved function valueFor(bytes32 _erc2362id) external view virtual override returns ( int256 _lastPrice, uint256 _lastTimestamp, uint256 _latestUpdateStatus ) { IWitnetPriceFeed _pricefeed = IWitnetPriceFeed(address(getPriceFeed(_erc2362id))); require(address(_pricefeed) != address(0), "WitnetPriceRouter: unsupported currency pair"); (_lastPrice, _lastTimestamp,, _latestUpdateStatus) = _pricefeed.lastValue(); } // ======================================================================== // --- Implementation of 'IWitnetPriceRouter' --------------------------- /// Helper pure function: returns hash of the provided ERC2362-compliant currency pair caption (aka ID). function currencyPairId(string memory _caption) public pure virtual override returns (bytes32) { return keccak256(bytes(_caption)); } /// Returns the ERC-165-compliant price feed contract currently serving /// updates on the given currency pair. function getPriceFeed(bytes32 _erc2362id) public view virtual override returns (IERC165) { return __pairs[_erc2362id].pricefeed; } /// Returns human-readable ERC2362-based caption of the currency pair being /// served by the given price feed contract address. /// @dev Fails if the given price feed contract address is not currently /// @dev registered in the router. function getPriceFeedCaption(IERC165 _pricefeed) public view virtual override returns (string memory) { require(supportsPriceFeed(_pricefeed), "WitnetPriceRouter: unknown"); return lookupERC2362ID(__pricefeedId_[address(_pricefeed)]); } /// Returns human-readable caption of the ERC2362-based currency pair identifier, if known. function lookupERC2362ID(bytes32 _erc2362id) public view virtual override returns (string memory _caption) { Pair storage _pair = __pairs[_erc2362id]; if ( bytes(_pair.base).length > 0 && bytes(_pair.quote).length > 0 ) { _caption = string(abi.encodePacked( "Price-", _pair.base, "/", _pair.quote, "-", _pair.decimals.toString() )); } } /// Register a price feed contract that will serve updates for the given currency pair. /// @dev Setting zero address to a currency pair implies that it will not be served any longer. /// @dev Otherwise, fails if the price feed contract does not support the `IWitnetPriceFeed` interface, /// @dev or if given price feed is already serving another currency pair (within this WitnetPriceRouter instance). function setPriceFeed( IERC165 _pricefeed, uint256 _decimals, string calldata _base, string calldata _quote ) public virtual override onlyOwner { if (address(_pricefeed) != address(0)) { require( _pricefeed.supportsInterface(type(IWitnetPriceFeed).interfaceId), "WitnetPriceRouter: feed contract is not compliant with IWitnetPriceFeed" ); require( __pricefeedId_[address(_pricefeed)] == bytes32(0), "WitnetPriceRouter: already serving a currency pair" ); } bytes memory _caption = abi.encodePacked( "Price-", bytes(_base), "/", bytes(_quote), "-", _decimals.toString() ); bytes32 _erc2362id = keccak256(_caption); Pair storage _record = __pairs[_erc2362id]; address _currentPriceFeed = address(_record.pricefeed); if (bytes(_record.base).length == 0) { _record.base = _base; _record.quote = _quote; _record.decimals = _decimals; __supportedCurrencyPairs.push(_erc2362id); } else if (_currentPriceFeed != address(0)) { __pricefeedId_[_currentPriceFeed] = bytes32(0); } if (address(_pricefeed) != _currentPriceFeed) { __pricefeedId_[address(_pricefeed)] = _erc2362id; } _record.pricefeed = _pricefeed; emit CurrencyPairSet(_erc2362id, _pricefeed); } /// Returns list of known currency pairs IDs. function supportedCurrencyPairs() external view virtual override returns (bytes32[] memory) { return __supportedCurrencyPairs; } /// Returns `true` if given pair is currently being served by a compliant price feed contract. function supportsCurrencyPair(bytes32 _erc2362id) public view virtual override returns (bool) { return address(__pairs[_erc2362id].pricefeed) != address(0); } /// Returns `true` if given price feed contract is currently serving updates to any known currency pair. function supportsPriceFeed(IERC165 _pricefeed) public view virtual override returns (bool) { return __pairs[__pricefeedId_[address(_pricefeed)]].pricefeed == _pricefeed; } } // File: contracts\WitnetPriceFeed.sol // Your contract needs to inherit from UsingWitnet contract WitnetPriceFeed is IWitnetPriceFeed, UsingWitnet, WitnetRequest { using Witnet for bytes; /// Stores the ID of the last price update posted to the Witnet Request Board. uint256 public override latestQueryId; /// Stores the ID of the last price update succesfully solved by the WRB. uint256 internal __lastValidQueryId; /// Constructor. /// @param _witnetRequestBoard WitnetRequestBoard entrypoint address. /// @param _witnetRequestBytecode Raw bytecode of Witnet Data Request to be used on every update request. constructor ( WitnetRequestBoard _witnetRequestBoard, bytes memory _witnetRequestBytecode ) UsingWitnet(_witnetRequestBoard) WitnetRequest(_witnetRequestBytecode) {} /// Estimates minimum fee amount in native currency to be paid when /// requesting a new price update. /// @dev Actual fee depends on the gas price of the `requestUpdate()` transaction. /// @param _gasPrice Gas price expected to be paid when calling `requestUpdate()` function estimateUpdateFee(uint256 _gasPrice) external view virtual override returns (uint256) { return witnet.estimateReward(_gasPrice); } /// Returns result of the last valid price update request successfully solved by the Witnet oracle. function lastPrice() public view virtual override returns (int256 _lastPrice) { Witnet.Result memory _result; uint _latestQueryId = latestQueryId; if ( _latestQueryId > 0 && _witnetCheckResultAvailability(_latestQueryId) ) { _result = witnet.readResponseResult(_latestQueryId); if (_result.success) { return int256(int64(witnet.asUint64(_result))); } } if (__lastValidQueryId > 0) { _result = witnet.readResponseResult(__lastValidQueryId); return int256(int64(witnet.asUint64(_result))); } } /// Returns the EVM-timestamp when last valid price was reported back from the Witnet oracle. function lastTimestamp() public view virtual override returns (uint256 _lastTimestamp) { Witnet.Result memory _result; Witnet.Response memory _response; uint _latestQueryId = latestQueryId; if ( _latestQueryId > 0 && _witnetCheckResultAvailability(_latestQueryId) ) { _response = witnet.readResponse(_latestQueryId); _result = witnet.resultFromCborBytes(_response.cborBytes); if (_result.success) { return _response.timestamp; } } if (__lastValidQueryId > 0) { _response = witnet.readResponse(__lastValidQueryId); return _response.timestamp; } } /// Returns tuple containing last valid price and timestamp, as well as status code of latest update /// request that got posted to the Witnet Request Board. /// @return _lastPrice Last valid price reported back from the Witnet oracle. /// @return _lastTimestamp EVM-timestamp of the last valid price. /// @return _lastDrTxHash Hash of the Witnet Data Request that solved the last valid price. /// @return _latestUpdateStatus Status code of the latest update request. function lastValue() external view virtual override returns ( int _lastPrice, uint _lastTimestamp, bytes32 _lastDrTxHash, uint _latestUpdateStatus ) { uint _latestQueryId = latestQueryId; if (_latestQueryId > 0) { bool _completed = _witnetCheckResultAvailability(_latestQueryId); if (_completed) { Witnet.Response memory _latestResponse = witnet.readResponse(_latestQueryId); Witnet.Result memory _latestResult = witnet.resultFromCborBytes(_latestResponse.cborBytes); if (_latestResult.success) { return ( int256(int64(witnet.asUint64(_latestResult))), _latestResponse.timestamp, _latestResponse.drTxHash, 200 ); } } if (__lastValidQueryId > 0) { Witnet.Response memory _lastValidResponse = witnet.readResponse(__lastValidQueryId); Witnet.Result memory _lastValidResult = witnet.resultFromCborBytes(_lastValidResponse.cborBytes); return ( int256(int64(witnet.asUint64(_lastValidResult))), _lastValidResponse.timestamp, _lastValidResponse.drTxHash, _completed ? 400 : 404 ); } } return (0, 0, 0, 404); } /// Returns identifier of the latest update request posted to the Witnet Request Board. /// @dev Returning 0 while the latest update request remains unsolved. function latestUpdateDrTxHash() external view virtual override returns (bytes32) { uint256 _latestQueryId = latestQueryId; if (_latestQueryId > 0) { if (_witnetCheckResultAvailability(_latestQueryId)) { return witnet.readResponseDrTxHash(_latestQueryId); } } return bytes32(0); } /// Returns error message of latest update request posted to the Witnet Request Board. /// @dev Returning empty string if the latest update request remains unsolved, or /// @dev if it was succesfully solved with no errors. function latestUpdateErrorMessage() external view virtual override returns (string memory _errorMessage) { uint256 _latestQueryId = latestQueryId; if (_latestQueryId > 0) { if (_witnetCheckResultAvailability(_latestQueryId)) { Witnet.Result memory _latestResult = witnet.readResponseResult(_latestQueryId); if (_latestResult.success == false) { (, _errorMessage) = witnet.asErrorMessage(_latestResult); } } } } /// Returns status code of latest update request posted to the Witnet Request Board: /// @dev Status codes: /// @dev - 200: update request was succesfully solved with no errors /// @dev - 400: update request was solved with errors /// @dev - 404: update request was not solved yet function latestUpdateStatus() public view virtual override returns (uint256) { uint _latestQueryId = latestQueryId; if (_latestQueryId > 0) { if (_witnetCheckResultAvailability(_latestQueryId)) { Witnet.Result memory _result = witnet.readResponseResult(_latestQueryId); return ( _result.success ? 200 // OK : 400 // Bad result ); } else { return 404; // not yet solved; } } return 200; } /// Returns `true` if latest update request posted to the Witnet Request Board /// has not been solved yet by the Witnet oracle. function pendingUpdate() public view virtual override returns (bool) { return ( latestQueryId != 0 && !_witnetCheckResultAvailability(latestQueryId) ); } /// Posts a new price update request to the Witnet Request Board. Requires payment of a fee /// that depends on the value of `tx.gasprice`. See `estimateUpdateFee(uint256)`. /// @dev If previous update request was not solved yet, calling this method again allows /// @dev upgrading the update fee if called with a higher `tx.gasprice` value. function requestUpdate() public payable virtual override { uint _usedFunds; uint _latestQueryId = latestQueryId; uint _latestUpdateStatus = latestUpdateStatus(); if (_latestUpdateStatus == 404) { // latest update is still pending, so just raise upgrade reward, // accordingly to current tx gasprice: _usedFunds = _witnetUpgradeReward(_latestQueryId); } else { // Check if latest update ended successfully: if (_latestUpdateStatus == 200) { // If so, remove previous last valid valid query from the WRB: if (__lastValidQueryId > 0) { _witnetDeleteQuery(__lastValidQueryId); } __lastValidQueryId = _latestQueryId; } else { // Otherwise, delete latest query, as it was faulty // and we are about to post a new update request: _witnetDeleteQuery(_latestQueryId); } // Post update request to the WRB: (_latestQueryId, _usedFunds) = _witnetPostRequest(this); // Update latest query id: latestQueryId = _latestQueryId; } // Transfer back unused funds: payable(msg.sender).transfer(msg.value - _usedFunds); if (_usedFunds > 0) { emit PriceFeeding(msg.sender, _latestQueryId, _usedFunds); } } /// Tells whether this contract implements the interface defined by `interfaceId`. /// @dev See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] /// @dev to learn more about how these ids are created. function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) { return ( _interfaceId == type(IERC165).interfaceId || _interfaceId == type(IWitnetPriceFeed).interfaceId ); } }
[{"inputs":[{"internalType":"contract WitnetRequestBoard","name":"_witnetRequestBoard","type":"address"},{"internalType":"bytes","name":"_witnetRequestBytecode","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"queryId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extraFee","type":"uint256"}],"name":"PriceFeeding","type":"event"},{"inputs":[],"name":"bytecode","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasPrice","type":"uint256"}],"name":"estimateUpdateFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPrice","outputs":[{"internalType":"int256","name":"_lastPrice","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimestamp","outputs":[{"internalType":"uint256","name":"_lastTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastValue","outputs":[{"internalType":"int256","name":"_lastPrice","type":"int256"},{"internalType":"uint256","name":"_lastTimestamp","type":"uint256"},{"internalType":"bytes32","name":"_lastDrTxHash","type":"bytes32"},{"internalType":"uint256","name":"_latestUpdateStatus","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestQueryId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestUpdateDrTxHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestUpdateErrorMessage","outputs":[{"internalType":"string","name":"_errorMessage","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestUpdateStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingUpdate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"requestUpdate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"witnet","outputs":[{"internalType":"contract WitnetRequestBoard","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162001f3338038062001f33833981016040819052620000349162000222565b80826001600160a01b038116620000915760405162461bcd60e51b815260206004820152601960248201527f5573696e675769746e65743a207a65726f206164647265737300000000000000604482015260640160405180910390fd5b6001600160a01b03166080528051620000b290600090602084019062000133565b50620000c981620000d660201b620010621760201c565b6001555062000372915050565b6000600282604051620000ea9190620002fd565b602060405180830381855afa15801562000108573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906200012d91906200031b565b92915050565b828054620001419062000335565b90600052602060002090601f016020900481019282620001655760008555620001b0565b82601f106200018057805160ff1916838001178555620001b0565b82800160010185558215620001b0579182015b82811115620001b057825182559160200191906001019062000193565b50620001be929150620001c2565b5090565b5b80821115620001be5760008155600101620001c3565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200020c578181015183820152602001620001f2565b838111156200021c576000848401525b50505050565b600080604083850312156200023657600080fd5b82516001600160a01b03811681146200024e57600080fd5b60208401519092506001600160401b03808211156200026c57600080fd5b818501915085601f8301126200028157600080fd5b815181811115620002965762000296620001d9565b604051601f8201601f19908116603f01168101908382118183101715620002c157620002c1620001d9565b81604052828152886020848701011115620002db57600080fd5b620002ee836020830160208801620001ef565b80955050505050509250929050565b6000825162000311818460208701620001ef565b9190910192915050565b6000602082840312156200032e57600080fd5b5051919050565b600181811c908216806200034a57607f821691505b602082108114156200036c57634e487b7160e01b600052602260045260246000fd5b50919050565b608051611afd62000436600039600081816101c00152818161032f015281816103c701528181610469015281816104fa0152818161059201528181610628015281816106d70152818161079e0152818161081b015281816108cf0152818161098d01528181610a0f01528181610abc01528181610b9a01528181610c4001528181610cd701528181610e7901528181610f2d015281816110ce0152818161117c01528181611222015281816112ca0152818161137001526114000152611afd6000f3fe6080604052600436106100dc5760003560e01c80635f7fac8c1161007f578063b15cde0711610059578063b15cde0714610246578063c47500c91461025b578063d86d8ebc14610270578063f09400021461028657600080fd5b80635f7fac8c146101fa57806371bc17651461021a5780639c312cfd1461023c57600080fd5b806309bd5a60116100bb57806309bd5a601461014e57806319d8ac6114610164578063431838341461017957806346d1d21a146101ae57600080fd5b8062a4dcac146100e157806301ffc9a71461010b578063053f14da1461012b575b600080fd5b3480156100ed57600080fd5b506100f661029b565b60405190151581526020015b60405180910390f35b34801561011757600080fd5b506100f66101263660046114c6565b6102bd565b34801561013757600080fd5b506101406102f4565b604051908152602001610102565b34801561015a57600080fd5b5061014060015481565b34801561017057600080fd5b50610140610534565b34801561018557600080fd5b5061018e610760565b604080519485526020850193909352918301526060820152608001610102565b3480156101ba57600080fd5b506101e27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610102565b34801561020657600080fd5b506101406102153660046114f7565b610b81565b34801561022657600080fd5b5061022f610c0d565b604051610102919061156c565b610244610d5a565b005b34801561025257600080fd5b50610140610e49565b34801561026757600080fd5b50610140610efa565b34801561027c57600080fd5b5061014060025481565b34801561029257600080fd5b5061022f610fd4565b60006002546000141580156102b857506102b66002546110b4565b155b905090565b60006001600160e01b031982166301ffc9a760e01b14806102ee57506001600160e01b03198216632089297160e11b145b92915050565b60006102fe611473565b60025480158015906103145750610314816110b4565b15610447576040516335369a6b60e21b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d4da69ac90602401600060405180830381865afa15801561037e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103a691908101906116c6565b8051909250156104475760405163bc7e25ff60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bc7e25ff906103fc908590600401611819565b602060405180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d91906118d4565b60070b9250505090565b6003541561052f576003546040516335369a6b60e21b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d4da69ac90602401600060405180830381865afa1580156104b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104e091908101906116c6565b60405163bc7e25ff60e01b81529092506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bc7e25ff906103fc908590600401611819565b505090565b600061053e611473565b604080516080810182526000808252602082018190529181019190915260608082015260025480158015906105775750610577816110b4565b156106b557604051633aa72df560e11b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063754e5bea90602401600060405180830381865afa1580156105e1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261060991908101906118ef565b606081015160405163e99e47f360e01b81529193506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e99e47f39161065b9160040161156c565b600060405180830381865afa158015610678573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106a091908101906116c6565b8051909350156106b557506020015192915050565b6003541561075a57600354604051633aa72df560e11b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063754e5bea90602401600060405180830381865afa158015610726573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261074e91908101906118ef565b60200151949350505050565b50505090565b6002546000908190819081908015610b6a57600061077d826110b4565b9050801561096857604051633aa72df560e11b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063754e5bea90602401600060405180830381865afa1580156107ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261081591908101906118ef565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e99e47f383606001516040518263ffffffff1660e01b8152600401610869919061156c565b600060405180830381865afa158015610886573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108ae91908101906116c6565b8051909150156109655760405163bc7e25ff60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bc7e25ff90610904908490600401611819565b602060405180830381865afa158015610921573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094591906118d4565b60070b8260200151836040015160c8975097509750975050505050610b7b565b50505b60035415610b6857600354604051633aa72df560e11b81526000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163754e5bea916109c49160040190815260200190565b600060405180830381865afa1580156109e1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a0991908101906118ef565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e99e47f383606001516040518263ffffffff1660e01b8152600401610a5d919061156c565b600060405180830381865afa158015610a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aa291908101906116c6565b60405163bc7e25ff60e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063bc7e25ff90610af1908490600401611819565b602060405180830381865afa158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3291906118d4565b60070b8260200151836040015185610b4c57610194610b50565b6101905b8061ffff169050975097509750975050505050610b7b565b505b506000935083925082915061019490505b90919293565b60405163d2e8756160e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d2e8756190602401602060405180830381865afa158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ee9190611991565b6002546060908015610d5657610c22816110b4565b15610d56576040516335369a6b60e21b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d4da69ac90602401600060405180830381865afa158015610c8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cb791908101906116c6565b805190915061052f57604051636ba401df60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d74803be90610d0c908490600401611819565b600060405180830381865afa158015610d29573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d5191908101906119aa565b935050505b5090565b60025460009081610d69610efa565b9050806101941415610d8557610d7e82611159565b9250610dcb565b8060c81415610dad5760035415610da357610da1600354611291565b505b6003829055610db8565b610db682611291565b505b610dc130611343565b6002829055935091505b336108fc610dd98534611a14565b6040518115909202916000818181858888f19350505050158015610e01573d6000803e3d6000fd5b508215610e4457604080518381526020810185905233917f177160e50d083725209651bf251badbab2b70d078dda089acd2101eefccd82c7910160405180910390a25b505050565b6002546000908015610ef257610e5e816110b4565b15610ef25760405163dc3c71cd60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063dc3c71cd90602401602060405180830381865afa158015610ec8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eec9190611991565b91505090565b506000919050565b6002546000908015610fcc57610f0f816110b4565b15610fc3576040516335369a6b60e21b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d4da69ac90602401600060405180830381865afa158015610f7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fa491908101906116c6565b8051909150610fb557610190610fb8565b60c85b61ffff169250505090565b61019491505090565b60c891505090565b60008054610fe190611a39565b80601f016020809104026020016040519081016040528092919081815260200182805461100d90611a39565b801561105a5780601f1061102f5761010080835404028352916020019161105a565b820191906000526020600020905b81548152906001019060200180831161103d57829003601f168201915b505050505081565b60006002826040516110749190611a74565b602060405180830381855afa158015611091573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906102ee9190611991565b60006002604051631bc1eaf360e21b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636f07abcc90602401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611aa6565b600381111561115257611152611a90565b1492915050565b604051631dd27daf60e01b81526004810182905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631dd27daf90602401602060405180830381865afa1580156111c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e79190611991565b905060006111f36113e8565b905060008282111561120c576112098383611a14565b90505b6040516366bfdc7560e01b8152600481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906366bfdc759083906024016000604051808303818588803b15801561126f57600080fd5b505af1158015611283573d6000803e3d6000fd5b509398975050505050505050565b6040805160808101825260008082526020820181905291810191909152606080820152604051637c1fbda360e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637c1fbda3906024016000604051808303816000875af115801561131b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102ee91908101906118ef565b60008061134e6113e8565b60405163b281a7bd60e01b81526001600160a01b0385811660048301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063b281a7bd90839060240160206040518083038185885af11580156113bc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906113e19190611991565b9150915091565b60405163d2e8756160e01b81523a60048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d2e8756190602401602060405180830381865afa15801561144f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b89190611991565b6040805180820182526000808252825161010081018452606060c0820181815260e083018490528252602082810184905294820183905281018290526080810182905260a0810191909152909182015290565b6000602082840312156114d857600080fd5b81356001600160e01b0319811681146114f057600080fd5b9392505050565b60006020828403121561150957600080fd5b5035919050565b60005b8381101561152b578181015183820152602001611513565b8381111561153a576000848401525b50505050565b60008151808452611558816020860160208601611510565b601f01601f19169290920160200192915050565b6020815260006114f06020830184611540565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156115b8576115b861157f565b60405290565b60405160c0810167ffffffffffffffff811182821017156115b8576115b861157f565b6040516080810167ffffffffffffffff811182821017156115b8576115b861157f565b600067ffffffffffffffff8084111561161f5761161f61157f565b604051601f8501601f19908116603f011681019082821181831017156116475761164761157f565b8160405280935085815286868601111561166057600080fd5b61166e866020830187611510565b5050509392505050565b600082601f83011261168957600080fd5b6114f083835160208501611604565b805160ff811681146116a957600080fd5b919050565b805167ffffffffffffffff811681146116a957600080fd5b600060208083850312156116d957600080fd5b825167ffffffffffffffff808211156116f157600080fd5b908401906040828703121561170557600080fd5b61170d611595565b8251801515811461171d57600080fd5b8152828401518281111561173057600080fd5b929092019160c0838803121561174557600080fd5b61174d6115be565b83518381111561175c57600080fd5b84016040818a03121561176e57600080fd5b611776611595565b81518581111561178557600080fd5b6117918b828501611678565b82525086820151945063ffffffff851685146117ac57600080fd5b8087018590528252506117c0848601611698565b858201526117d060408501611698565b60408201526117e160608501611698565b60608201526117f2608085016116ae565b608082015261180360a085016116ae565b60a0820152938101939093525090949350505050565b6020815281511515602082015260006020830151604080840152805160c0606085015280516040610120860152611854610160860182611540565b60209283015163ffffffff166101408701529183015160ff81166080870152919050604083015160ff811660a08701529150606083015160ff811660c08701529150608083015167ffffffffffffffff811660e0870152915060a083015192506118cb61010086018467ffffffffffffffff169052565b95945050505050565b6000602082840312156118e657600080fd5b6114f0826116ae565b60006020828403121561190157600080fd5b815167ffffffffffffffff8082111561191957600080fd5b908301906080828603121561192d57600080fd5b6119356115e1565b82516001600160a01b038116811461194c57600080fd5b80825250602083015160208201526040830151604082015260608301518281111561197657600080fd5b61198287828601611678565b60608301525095945050505050565b6000602082840312156119a357600080fd5b5051919050565b600080604083850312156119bd57600080fd5b825161010081106119cd57600080fd5b602084015190925067ffffffffffffffff8111156119ea57600080fd5b8301601f810185136119fb57600080fd5b611a0a85825160208401611604565b9150509250929050565b600082821015611a3457634e487b7160e01b600052601160045260246000fd5b500390565b600181811c90821680611a4d57607f821691505b60208210811415611a6e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611a86818460208701611510565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215611ab857600080fd5b8151600481106114f057600080fdfea26469706673582212202977364ad8abd7d2cccc99c3533c2c74e10d3020a7ee7f9d50867d1beed6368964736f6c634300080b003300000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001f00adb0312560801123a68747470733a2f2f6170692e62696e616e63652e636f6d2f6170692f76332f7469636b65722f70726963653f73796d626f6c3d425443555344541a168418778218646570726963658218571a000f4240185b124d0801122c68747470733a2f2f6170692e62697466696e65782e636f6d2f76312f7075627469636b65722f6274637573641a1b8418778218646a6c6173745f70726963658218571a000f4240185b12630801123268747470733a2f2f6170692e6b72616b656e2e636f6d2f302f7075626c69632f5469636b65723f706169723d4254435553441a2b87187782186666726573756c7482186668585842545a55534482186161618216008218571a000f4240185b12480801122d68747470733a2f2f7777772e6269747374616d702e6e65742f6170692f76322f7469636b65722f6274637573641a15841877821864646c6173748218571a000f4240185b12650801124068747470733a2f2f6170692e626974747265782e636f6d2f6170692f76312e312f7075626c69632f6765747469636b65723f6d61726b65743d5553442d4254431a1f85187782186666726573756c74821864644c6173748218571a000f4240185b1a0d0a0908051205fa402000001003220d0a0908051205fa40200000100310c0843d180a20c0843d28463080e497d01200000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106100dc5760003560e01c80635f7fac8c1161007f578063b15cde0711610059578063b15cde0714610246578063c47500c91461025b578063d86d8ebc14610270578063f09400021461028657600080fd5b80635f7fac8c146101fa57806371bc17651461021a5780639c312cfd1461023c57600080fd5b806309bd5a60116100bb57806309bd5a601461014e57806319d8ac6114610164578063431838341461017957806346d1d21a146101ae57600080fd5b8062a4dcac146100e157806301ffc9a71461010b578063053f14da1461012b575b600080fd5b3480156100ed57600080fd5b506100f661029b565b60405190151581526020015b60405180910390f35b34801561011757600080fd5b506100f66101263660046114c6565b6102bd565b34801561013757600080fd5b506101406102f4565b604051908152602001610102565b34801561015a57600080fd5b5061014060015481565b34801561017057600080fd5b50610140610534565b34801561018557600080fd5b5061018e610760565b604080519485526020850193909352918301526060820152608001610102565b3480156101ba57600080fd5b506101e27f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a242581565b6040516001600160a01b039091168152602001610102565b34801561020657600080fd5b506101406102153660046114f7565b610b81565b34801561022657600080fd5b5061022f610c0d565b604051610102919061156c565b610244610d5a565b005b34801561025257600080fd5b50610140610e49565b34801561026757600080fd5b50610140610efa565b34801561027c57600080fd5b5061014060025481565b34801561029257600080fd5b5061022f610fd4565b60006002546000141580156102b857506102b66002546110b4565b155b905090565b60006001600160e01b031982166301ffc9a760e01b14806102ee57506001600160e01b03198216632089297160e11b145b92915050565b60006102fe611473565b60025480158015906103145750610314816110b4565b15610447576040516335369a6b60e21b8152600481018290527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063d4da69ac90602401600060405180830381865afa15801561037e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103a691908101906116c6565b8051909250156104475760405163bc7e25ff60e01b81526001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169063bc7e25ff906103fc908590600401611819565b602060405180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d91906118d4565b60070b9250505090565b6003541561052f576003546040516335369a6b60e21b815260048101919091527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063d4da69ac90602401600060405180830381865afa1580156104b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104e091908101906116c6565b60405163bc7e25ff60e01b81529092506001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169063bc7e25ff906103fc908590600401611819565b505090565b600061053e611473565b604080516080810182526000808252602082018190529181019190915260608082015260025480158015906105775750610577816110b4565b156106b557604051633aa72df560e11b8152600481018290527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063754e5bea90602401600060405180830381865afa1580156105e1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261060991908101906118ef565b606081015160405163e99e47f360e01b81529193506001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169163e99e47f39161065b9160040161156c565b600060405180830381865afa158015610678573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106a091908101906116c6565b8051909350156106b557506020015192915050565b6003541561075a57600354604051633aa72df560e11b815260048101919091527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063754e5bea90602401600060405180830381865afa158015610726573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261074e91908101906118ef565b60200151949350505050565b50505090565b6002546000908190819081908015610b6a57600061077d826110b4565b9050801561096857604051633aa72df560e11b8152600481018390526000907f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063754e5bea90602401600060405180830381865afa1580156107ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261081591908101906118ef565b905060007f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b031663e99e47f383606001516040518263ffffffff1660e01b8152600401610869919061156c565b600060405180830381865afa158015610886573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108ae91908101906116c6565b8051909150156109655760405163bc7e25ff60e01b81526001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169063bc7e25ff90610904908490600401611819565b602060405180830381865afa158015610921573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094591906118d4565b60070b8260200151836040015160c8975097509750975050505050610b7b565b50505b60035415610b6857600354604051633aa72df560e11b81526000916001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169163754e5bea916109c49160040190815260200190565b600060405180830381865afa1580156109e1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a0991908101906118ef565b905060007f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b031663e99e47f383606001516040518263ffffffff1660e01b8152600401610a5d919061156c565b600060405180830381865afa158015610a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aa291908101906116c6565b60405163bc7e25ff60e01b81529091506001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169063bc7e25ff90610af1908490600401611819565b602060405180830381865afa158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3291906118d4565b60070b8260200151836040015185610b4c57610194610b50565b6101905b8061ffff169050975097509750975050505050610b7b565b505b506000935083925082915061019490505b90919293565b60405163d2e8756160e01b8152600481018290526000907f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063d2e8756190602401602060405180830381865afa158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ee9190611991565b6002546060908015610d5657610c22816110b4565b15610d56576040516335369a6b60e21b8152600481018290526000907f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063d4da69ac90602401600060405180830381865afa158015610c8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cb791908101906116c6565b805190915061052f57604051636ba401df60e11b81526001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425169063d74803be90610d0c908490600401611819565b600060405180830381865afa158015610d29573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d5191908101906119aa565b935050505b5090565b60025460009081610d69610efa565b9050806101941415610d8557610d7e82611159565b9250610dcb565b8060c81415610dad5760035415610da357610da1600354611291565b505b6003829055610db8565b610db682611291565b505b610dc130611343565b6002829055935091505b336108fc610dd98534611a14565b6040518115909202916000818181858888f19350505050158015610e01573d6000803e3d6000fd5b508215610e4457604080518381526020810185905233917f177160e50d083725209651bf251badbab2b70d078dda089acd2101eefccd82c7910160405180910390a25b505050565b6002546000908015610ef257610e5e816110b4565b15610ef25760405163dc3c71cd60e01b8152600481018290527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063dc3c71cd90602401602060405180830381865afa158015610ec8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eec9190611991565b91505090565b506000919050565b6002546000908015610fcc57610f0f816110b4565b15610fc3576040516335369a6b60e21b8152600481018290526000907f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063d4da69ac90602401600060405180830381865afa158015610f7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fa491908101906116c6565b8051909150610fb557610190610fb8565b60c85b61ffff169250505090565b61019491505090565b60c891505090565b60008054610fe190611a39565b80601f016020809104026020016040519081016040528092919081815260200182805461100d90611a39565b801561105a5780601f1061102f5761010080835404028352916020019161105a565b820191906000526020600020905b81548152906001019060200180831161103d57829003601f168201915b505050505081565b60006002826040516110749190611a74565b602060405180830381855afa158015611091573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906102ee9190611991565b60006002604051631bc1eaf360e21b8152600481018490527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b031690636f07abcc90602401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611aa6565b600381111561115257611152611a90565b1492915050565b604051631dd27daf60e01b81526004810182905260009081906001600160a01b037f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24251690631dd27daf90602401602060405180830381865afa1580156111c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e79190611991565b905060006111f36113e8565b905060008282111561120c576112098383611a14565b90505b6040516366bfdc7560e01b8152600481018690527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b0316906366bfdc759083906024016000604051808303818588803b15801561126f57600080fd5b505af1158015611283573d6000803e3d6000fd5b509398975050505050505050565b6040805160808101825260008082526020820181905291810191909152606080820152604051637c1fbda360e01b8152600481018390527f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b031690637c1fbda3906024016000604051808303816000875af115801561131b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102ee91908101906118ef565b60008061134e6113e8565b60405163b281a7bd60e01b81526001600160a01b0385811660048301529192507f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24259091169063b281a7bd90839060240160206040518083038185885af11580156113bc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906113e19190611991565b9150915091565b60405163d2e8756160e01b81523a60048201526000907f00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a24256001600160a01b03169063d2e8756190602401602060405180830381865afa15801561144f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b89190611991565b6040805180820182526000808252825161010081018452606060c0820181815260e083018490528252602082810184905294820183905281018290526080810182905260a0810191909152909182015290565b6000602082840312156114d857600080fd5b81356001600160e01b0319811681146114f057600080fd5b9392505050565b60006020828403121561150957600080fd5b5035919050565b60005b8381101561152b578181015183820152602001611513565b8381111561153a576000848401525b50505050565b60008151808452611558816020860160208601611510565b601f01601f19169290920160200192915050565b6020815260006114f06020830184611540565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156115b8576115b861157f565b60405290565b60405160c0810167ffffffffffffffff811182821017156115b8576115b861157f565b6040516080810167ffffffffffffffff811182821017156115b8576115b861157f565b600067ffffffffffffffff8084111561161f5761161f61157f565b604051601f8501601f19908116603f011681019082821181831017156116475761164761157f565b8160405280935085815286868601111561166057600080fd5b61166e866020830187611510565b5050509392505050565b600082601f83011261168957600080fd5b6114f083835160208501611604565b805160ff811681146116a957600080fd5b919050565b805167ffffffffffffffff811681146116a957600080fd5b600060208083850312156116d957600080fd5b825167ffffffffffffffff808211156116f157600080fd5b908401906040828703121561170557600080fd5b61170d611595565b8251801515811461171d57600080fd5b8152828401518281111561173057600080fd5b929092019160c0838803121561174557600080fd5b61174d6115be565b83518381111561175c57600080fd5b84016040818a03121561176e57600080fd5b611776611595565b81518581111561178557600080fd5b6117918b828501611678565b82525086820151945063ffffffff851685146117ac57600080fd5b8087018590528252506117c0848601611698565b858201526117d060408501611698565b60408201526117e160608501611698565b60608201526117f2608085016116ae565b608082015261180360a085016116ae565b60a0820152938101939093525090949350505050565b6020815281511515602082015260006020830151604080840152805160c0606085015280516040610120860152611854610160860182611540565b60209283015163ffffffff166101408701529183015160ff81166080870152919050604083015160ff811660a08701529150606083015160ff811660c08701529150608083015167ffffffffffffffff811660e0870152915060a083015192506118cb61010086018467ffffffffffffffff169052565b95945050505050565b6000602082840312156118e657600080fd5b6114f0826116ae565b60006020828403121561190157600080fd5b815167ffffffffffffffff8082111561191957600080fd5b908301906080828603121561192d57600080fd5b6119356115e1565b82516001600160a01b038116811461194c57600080fd5b80825250602083015160208201526040830151604082015260608301518281111561197657600080fd5b61198287828601611678565b60608301525095945050505050565b6000602082840312156119a357600080fd5b5051919050565b600080604083850312156119bd57600080fd5b825161010081106119cd57600080fd5b602084015190925067ffffffffffffffff8111156119ea57600080fd5b8301601f810185136119fb57600080fd5b611a0a85825160208401611604565b9150509250929050565b600082821015611a3457634e487b7160e01b600052601160045260246000fd5b500390565b600181811c90821680611a4d57607f821691505b60208210811415611a6e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611a86818460208701611510565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215611ab857600080fd5b8151600481106114f057600080fdfea26469706673582212202977364ad8abd7d2cccc99c3533c2c74e10d3020a7ee7f9d50867d1beed6368964736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001f00adb0312560801123a68747470733a2f2f6170692e62696e616e63652e636f6d2f6170692f76332f7469636b65722f70726963653f73796d626f6c3d425443555344541a168418778218646570726963658218571a000f4240185b124d0801122c68747470733a2f2f6170692e62697466696e65782e636f6d2f76312f7075627469636b65722f6274637573641a1b8418778218646a6c6173745f70726963658218571a000f4240185b12630801123268747470733a2f2f6170692e6b72616b656e2e636f6d2f302f7075626c69632f5469636b65723f706169723d4254435553441a2b87187782186666726573756c7482186668585842545a55534482186161618216008218571a000f4240185b12480801122d68747470733a2f2f7777772e6269747374616d702e6e65742f6170692f76322f7469636b65722f6274637573641a15841877821864646c6173748218571a000f4240185b12650801124068747470733a2f2f6170692e626974747265782e636f6d2f6170692f76312e312f7075626c69632f6765747469636b65723f6d61726b65743d5553442d4254431a1f85187782186666726573756c74821864644c6173748218571a000f4240185b1a0d0a0908051205fa402000001003220d0a0908051205fa40200000100310c0843d180a20c0843d28463080e497d01200000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _witnetRequestBoard (address): 0x02Cd4089679EAA9431a88170fd784e7dE78A2425
Arg [1] : _witnetRequestBytecode (bytes): 0x0adb0312560801123a68747470733a2f2f6170692e62696e616e63652e636f6d2f6170692f76332f7469636b65722f70726963653f73796d626f6c3d425443555344541a168418778218646570726963658218571a000f4240185b124d0801122c68747470733a2f2f6170692e62697466696e65782e636f6d2f76312f7075627469636b65722f6274637573641a1b8418778218646a6c6173745f70726963658218571a000f4240185b12630801123268747470733a2f2f6170692e6b72616b656e2e636f6d2f302f7075626c69632f5469636b65723f706169723d4254435553441a2b87187782186666726573756c7482186668585842545a55534482186161618216008218571a000f4240185b12480801122d68747470733a2f2f7777772e6269747374616d702e6e65742f6170692f76322f7469636b65722f6274637573641a15841877821864646c6173748218571a000f4240185b12650801124068747470733a2f2f6170692e626974747265782e636f6d2f6170692f76312e312f7075626c69632f6765747469636b65723f6d61726b65743d5553442d4254431a1f85187782186666726573756c74821864644c6173748218571a000f4240185b1a0d0a0908051205fa402000001003220d0a0908051205fa40200000100310c0843d180a20c0843d28463080e497d012
-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 00000000000000000000000002cd4089679eaa9431a88170fd784e7de78a2425
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001f0
Arg [3] : 0adb0312560801123a68747470733a2f2f6170692e62696e616e63652e636f6d
Arg [4] : 2f6170692f76332f7469636b65722f70726963653f73796d626f6c3d42544355
Arg [5] : 5344541a168418778218646570726963658218571a000f4240185b124d080112
Arg [6] : 2c68747470733a2f2f6170692e62697466696e65782e636f6d2f76312f707562
Arg [7] : 7469636b65722f6274637573641a1b8418778218646a6c6173745f7072696365
Arg [8] : 8218571a000f4240185b12630801123268747470733a2f2f6170692e6b72616b
Arg [9] : 656e2e636f6d2f302f7075626c69632f5469636b65723f706169723d42544355
Arg [10] : 53441a2b87187782186666726573756c7482186668585842545a555344821861
Arg [11] : 61618216008218571a000f4240185b12480801122d68747470733a2f2f777777
Arg [12] : 2e6269747374616d702e6e65742f6170692f76322f7469636b65722f62746375
Arg [13] : 73641a15841877821864646c6173748218571a000f4240185b12650801124068
Arg [14] : 747470733a2f2f6170692e626974747265782e636f6d2f6170692f76312e312f
Arg [15] : 7075626c69632f6765747469636b65723f6d61726b65743d5553442d4254431a
Arg [16] : 1f85187782186666726573756c74821864644c6173748218571a000f4240185b
Arg [17] : 1a0d0a0908051205fa402000001003220d0a0908051205fa40200000100310c0
Arg [18] : 843d180a20c0843d28463080e497d01200000000000000000000000000000000
Deployed Bytecode Sourcemap
53570:10260:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61156:238;;;;;;;;;;;;;:::i;:::-;;;179:14:1;;172:22;154:41;;142:2;127:18;61156:238:0;;;;;;;;63538:289;;;;;;;;;;-1:-1:-1;63538:289:0;;;;;:::i;:::-;;:::i;54997:707::-;;;;;;;;;;;;;:::i;:::-;;;641:25:1;;;629:2;614:18;54997:707:0;497:175:1;32728:28:0;;;;;;;;;;;;;;;;55811:779;;;;;;;;;;;;;:::i;57096:1563::-;;;;;;;;;;;;;:::i;:::-;;;;1270:25:1;;;1326:2;1311:18;;1304:34;;;;1354:18;;;1347:34;1412:2;1397:18;;1390:34;1257:3;1242:19;57096:1563:0;1041:389:1;27779:42:0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1633:32:1;;;1615:51;;1603:2;1588:18;27779:42:0;1435:237:1;54699:185:0;;;;;;;;;;-1:-1:-1;54699:185:0;;;;;:::i;:::-;;:::i;59477:572::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;61764:1498::-;;;:::i;:::-;;58836:395;;;;;;;;;;;;;:::i;60370:638::-;;;;;;;;;;;;;:::i;53798:37::-;;;;;;;;;;;;;;;;32614:30;;;;;;;;;;;;;:::i;61156:238::-;61246:4;61290:13;;61307:1;61290:18;;:85;;;;;61330:45;61361:13;;61330:30;:45::i;:::-;61329:46;61290:85;61268:118;;61156:238;:::o;63538:289::-;63652:4;-1:-1:-1;;;;;;63696:41:0;;-1:-1:-1;;;63696:41:0;;:112;;-1:-1:-1;;;;;;;63758:50:0;;-1:-1:-1;;;63758:50:0;63696:112;63674:145;63538:289;-1:-1:-1;;63538:289:0:o;54997:707::-;55083:17;55118:28;;:::i;:::-;55179:13;;55221:18;;;;;:85;;;55260:46;55291:14;55260:30;:46::i;:::-;55203:309;;;55343:41;;-1:-1:-1;;;55343:41:0;;;;;641:25:1;;;55343:6:0;-1:-1:-1;;;;;55343:25:0;;;;614:18:1;;55343:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;55343:41:0;;;;;;;;;;;;:::i;:::-;55403:15;;55333:51;;-1:-1:-1;55399:102:0;;;55459:24;;-1:-1:-1;;;55459:24:0;;-1:-1:-1;;;;;55459:6:0;:15;;;;:24;;55475:7;;55459:24;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;55446:39;;55439:46;;;;54997:707;:::o;55399:102::-;55526:18;;:22;55522:175;;55601:18;;55575:45;;-1:-1:-1;;;55575:45:0;;;;;641:25:1;;;;55575:6:0;-1:-1:-1;;;;;55575:25:0;;;;614:18:1;;55575:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;55575:45:0;;;;;;;;;;;;:::i;:::-;55655:24;;-1:-1:-1;;;55655:24:0;;55565:55;;-1:-1:-1;;;;;;55655:6:0;:15;;;;:24;;55565:55;;55655:24;;;:::i;55522:175::-;55107:597;;54997:707;:::o;55811:779::-;55901:22;55941:28;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56045:13:0;;56087:18;;;;;:85;;;56126:46;56157:14;56126:30;:46::i;:::-;56069:357;;;56211:35;;-1:-1:-1;;;56211:35:0;;;;;641:25:1;;;56211:6:0;-1:-1:-1;;;;;56211:19:0;;;;614:18:1;;56211:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;56211:35:0;;;;;;;;;;;;:::i;:::-;56298:19;;;;56271:47;;-1:-1:-1;;;56271:47:0;;56199;;-1:-1:-1;;;;;;56271:6:0;:26;;;;:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;56271:47:0;;;;;;;;;;;;:::i;:::-;56337:15;;56261:57;;-1:-1:-1;56333:82:0;;;-1:-1:-1;56380:19:0;;;;55811:779;-1:-1:-1;;55811:779:0:o;56333:82::-;56440:18;;:22;56436:147;;56511:18;;56491:39;;-1:-1:-1;;;56491:39:0;;;;;641:25:1;;;;56491:6:0;-1:-1:-1;;;;;56491:19:0;;;;614:18:1;;56491:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;56491:39:0;;;;;;;;;;;;:::i;:::-;56552:19;;;;55811:779;-1:-1:-1;;;;55811:779:0:o;56436:147::-;55930:660;;;55811:779;:::o;57096:1563::-;57371:13;;57198:14;;;;;;;;57399:18;;57395:1225;;57434:15;57452:46;57483:14;57452:30;:46::i;:::-;57434:64;;57517:10;57513:559;;;57589:35;;-1:-1:-1;;;57589:35:0;;;;;641:25:1;;;57548:38:0;;57589:6;-1:-1:-1;;;;;57589:19:0;;;;614:18:1;;57589:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;57589:35:0;;;;;;;;;;;;:::i;:::-;57548:76;;57643:34;57680:6;-1:-1:-1;;;;;57680:26:0;;57707:15;:25;;;57680:53;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;57680:53:0;;;;;;;;;;;;:::i;:::-;57756:21;;57643:90;;-1:-1:-1;57752:305:0;;;57849:30;;-1:-1:-1;;;57849:30:0;;-1:-1:-1;;;;;57849:6:0;:15;;;;:30;;57865:13;;57849:30;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;57836:45;;57908:15;:25;;;57960:15;:24;;;58011:3;57802:235;;;;;;;;;;;;;;57752:305;57529:543;;57513:559;58090:18;;:22;58086:523;;58197:18;;58177:39;;-1:-1:-1;;;58177:39:0;;58133:41;;-1:-1:-1;;;;;58177:6:0;:19;;;;:39;;;;641:25:1;;;629:2;614:18;;497:175;58177:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;58177:39:0;;;;;;;;;;;;:::i;:::-;58133:83;;58235:37;58275:6;-1:-1:-1;;;;;58275:26:0;;58302:18;:28;;;58275:56;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;58275:56:0;;;;;;;;;;;;:::i;:::-;58393:33;;-1:-1:-1;;;58393:33:0;;58235:96;;-1:-1:-1;;;;;;58393:6:0;:15;;;;:33;;58235:96;;58393:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;58380:48;;58451:18;:28;;;58502:18;:27;;;58552:10;:22;;58571:3;58552:22;;;58565:3;58552:22;58350:243;;;;;;;;;;;;;;;;;;;58086:523;57419:1201;57395:1225;-1:-1:-1;58638:1:0;;-1:-1:-1;58638:1:0;;-1:-1:-1;58638:1:0;;-1:-1:-1;58647:3:0;;-1:-1:-1;57096:1563:0;;;;;:::o;54699:185::-;54844:32;;-1:-1:-1;;;54844:32:0;;;;;641:25:1;;;54812:7:0;;54844:6;-1:-1:-1;;;;;54844:21:0;;;;614:18:1;;54844:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;59477:572::-;59650:13;;59580:27;;59678:18;;59674:368;;59717:46;59748:14;59717:30;:46::i;:::-;59713:318;;;59821:41;;-1:-1:-1;;;59821:41:0;;;;;641:25:1;;;59784:34:0;;59821:6;-1:-1:-1;;;;;59821:25:0;;;;614:18:1;;59821:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;59821:41:0;;;;;;;;;;;;:::i;:::-;59885:21;;59784:78;;-1:-1:-1;59881:135:0;;59960:36;;-1:-1:-1;;;59960:36:0;;-1:-1:-1;;;;;59960:6:0;:21;;;;:36;;59982:13;;59960:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;59960:36:0;;;;;;;;;;;;:::i;:::-;59940:56;-1:-1:-1;;59765:266:0;59713:318;59614:435;59477:572;:::o;61764:1498::-;61903:13;;61855:15;;;61954:20;:18;:20::i;:::-;61927:47;;61989:19;62012:3;61989:26;61985:1053;;;62176:36;62197:14;62176:20;:36::i;:::-;62163:49;;61985:1053;;;62308:19;62331:3;62308:26;62304:520;;;62439:18;;:22;62435:109;;62486:38;62505:18;;62486;:38::i;:::-;;62435:109;62562:18;:35;;;62304:520;;;62774:34;62793:14;62774:18;:34::i;:::-;;62304:520;62917:24;62936:4;62917:18;:24::i;:::-;62996:13;:30;;;62886:55;-1:-1:-1;62886:55:0;-1:-1:-1;61985:1053:0;63096:10;63088:52;63117:22;63129:10;63117:9;:22;:::i;:::-;63088:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;63155:14:0;;63151:104;;63191:52;;;10583:25:1;;;10639:2;10624:18;;10617:34;;;63204:10:0;;63191:52;;10556:18:1;63191:52:0;;;;;;;63151:104;61844:1418;;;61764:1498::o;58836:395::-;58985:13;;58935:7;;59013:18;;59009:187;;59052:46;59083:14;59052:30;:46::i;:::-;59048:137;;;59126:43;;-1:-1:-1;;;59126:43:0;;;;;641:25:1;;;59126:6:0;-1:-1:-1;;;;;59126:27:0;;;;614:18:1;;59126:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;59119:50;;;58836:395;:::o;59048:137::-;-1:-1:-1;59221:1:0;;58836:395;-1:-1:-1;58836:395:0:o;60370:638::-;60512:13;;60465:7;;60540:18;;60536:444;;60579:46;60610:14;60579:30;:46::i;:::-;60575:394;;;60677:41;;-1:-1:-1;;;60677:41:0;;;;;641:25:1;;;60646:28:0;;60677:6;-1:-1:-1;;;;;60677:25:0;;;;614:18:1;;60677:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;60677:41:0;;;;;;;;;;;;:::i;:::-;60767:15;;60646:72;;-1:-1:-1;60767:83:0;;60847:3;60767:83;;;60810:3;60767:83;60737:146;;;;;;60370:638;:::o;60575:394::-;60931:3;60924:10;;;60370:638;:::o;60575:394::-;60997:3;60990:10;;;60370:638;:::o;32614:30::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3085:113::-;3146:7;3173:17;3180:9;3173:17;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;29021:205::-;29132:4;29191:27;29161:26;;-1:-1:-1;;;29161:26:0;;;;;641:25:1;;;29161:6:0;-1:-1:-1;;;;;29161:21:0;;;;614:18:1;;29161:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:57;;;;;;;;:::i;:::-;;;29021:205;-1:-1:-1;;29021:205:0:o;30986:513::-;31132:29;;-1:-1:-1;;;31132:29:0;;;;;641:25:1;;;31082:7:0;;;;-1:-1:-1;;;;;31132:6:0;:24;;;;614:18:1;;31132:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;31107:54;;31180:18;31201:23;:21;:23::i;:::-;31180:44;;31235:19;31286:14;31273:10;:27;31269:103;;;31332:27;31345:14;31332:10;:27;:::i;:::-;31317:43;;31269:103;31382:45;;-1:-1:-1;;;31382:45:0;;;;;641:25:1;;;31382:6:0;-1:-1:-1;;;;;31382:20:0;;;;31410:11;;614:18:1;;31382:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31480:11:0;;30986:513;-1:-1:-1;;;;;;;;30986:513:0:o;32187:172::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32328:23:0;;-1:-1:-1;;;32328:23:0;;;;;641:25:1;;;32328:6:0;-1:-1:-1;;;;;32328:18:0;;;;614::1;;32328:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;32328:23:0;;;;;;;;;;;;:::i;30404:254::-;30510:11;30523:15;30566:23;:21;:23::i;:::-;30606:44;;-1:-1:-1;;;30606:44:0;;-1:-1:-1;;;;;1633:32:1;;;30606:44:0;;;1615:51:1;30556:33:0;;-1:-1:-1;30606:6:0;:18;;;;;;30556:33;;1588:18:1;;30606:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;30600:50;;30404:254;;;:::o;29886:165::-;30009:34;;-1:-1:-1;;;30009:34:0;;30031:11;30009:34;;;641:25:1;29977:7:0;;30009:6;-1:-1:-1;;;;;30009:21:0;;;;614:18:1;;30009:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;206:286:1:-;264:6;317:2;305:9;296:7;292:23;288:32;285:52;;;333:1;330;323:12;285:52;359:23;;-1:-1:-1;;;;;;411:32:1;;401:43;;391:71;;458:1;455;448:12;391:71;481:5;206:286;-1:-1:-1;;;206:286:1:o;1677:180::-;1736:6;1789:2;1777:9;1768:7;1764:23;1760:32;1757:52;;;1805:1;1802;1795:12;1757:52;-1:-1:-1;1828:23:1;;1677:180;-1:-1:-1;1677:180:1:o;1862:258::-;1934:1;1944:113;1958:6;1955:1;1952:13;1944:113;;;2034:11;;;2028:18;2015:11;;;2008:39;1980:2;1973:10;1944:113;;;2075:6;2072:1;2069:13;2066:48;;;2110:1;2101:6;2096:3;2092:16;2085:27;2066:48;;1862:258;;;:::o;2125:::-;2167:3;2205:5;2199:12;2232:6;2227:3;2220:19;2248:63;2304:6;2297:4;2292:3;2288:14;2281:4;2274:5;2270:16;2248:63;:::i;:::-;2365:2;2344:15;-1:-1:-1;;2340:29:1;2331:39;;;;2372:4;2327:50;;2125:258;-1:-1:-1;;2125:258:1:o;2388:220::-;2537:2;2526:9;2519:21;2500:4;2557:45;2598:2;2587:9;2583:18;2575:6;2557:45;:::i;2836:127::-;2897:10;2892:3;2888:20;2885:1;2878:31;2928:4;2925:1;2918:15;2952:4;2949:1;2942:15;2968:252;3035:4;3029:11;;;3067:17;;3114:18;3099:34;;3135:22;;;3096:62;3093:88;;;3161:18;;:::i;:::-;3197:4;3190:24;2968:252;:::o;3225:253::-;3297:2;3291:9;3339:4;3327:17;;3374:18;3359:34;;3395:22;;;3356:62;3353:88;;;3421:18;;:::i;3483:253::-;3555:2;3549:9;3597:4;3585:17;;3632:18;3617:34;;3653:22;;;3614:62;3611:88;;;3679:18;;:::i;3741:601::-;3816:5;3846:18;3887:2;3879:6;3876:14;3873:40;;;3893:18;;:::i;:::-;3968:2;3962:9;3936:2;4022:15;;-1:-1:-1;;4018:24:1;;;4044:2;4014:33;4010:42;3998:55;;;4068:18;;;4088:22;;;4065:46;4062:72;;;4114:18;;:::i;:::-;4154:10;4150:2;4143:22;4183:6;4174:15;;4213:6;4205;4198:22;4253:3;4244:6;4239:3;4235:16;4232:25;4229:45;;;4270:1;4267;4260:12;4229:45;4283:53;4329:6;4322:4;4314:6;4310:17;4305:3;4283:53;:::i;:::-;;;;3741:601;;;;;:::o;4347:235::-;4400:5;4453:3;4446:4;4438:6;4434:17;4430:27;4420:55;;4471:1;4468;4461:12;4420:55;4493:83;4572:3;4563:6;4557:13;4550:4;4542:6;4538:17;4493:83;:::i;4587:160::-;4664:13;;4717:4;4706:16;;4696:27;;4686:55;;4737:1;4734;4727:12;4686:55;4587:160;;;:::o;4752:175::-;4830:13;;4883:18;4872:30;;4862:41;;4852:69;;4917:1;4914;4907:12;4932:1823;5025:6;5056:2;5099;5087:9;5078:7;5074:23;5070:32;5067:52;;;5115:1;5112;5105:12;5067:52;5148:9;5142:16;5177:18;5218:2;5210:6;5207:14;5204:34;;;5234:1;5231;5224:12;5204:34;5257:22;;;;5313:4;5295:16;;;5291:27;5288:47;;;5331:1;5328;5321:12;5288:47;5357:17;;:::i;:::-;5404:2;5398:9;5452:7;5445:15;5438:23;5429:7;5426:36;5416:64;;5476:1;5473;5466:12;5416:64;5489:22;;5542:11;;;5536:18;5566:16;;;5563:36;;;5595:1;5592;5585:12;5563:36;5618:17;;;;;5669:4;5651:16;;;5647:27;5644:47;;;5687:1;5684;5677:12;5644:47;5715:22;;:::i;:::-;5768:2;5762:9;5796:2;5786:8;5783:16;5780:36;;;5812:1;5809;5802:12;5780:36;5835:17;;5886:4;5868:16;;;5864:27;5861:47;;;5904:1;5901;5894:12;5861:47;5932:17;;:::i;:::-;5980:2;5974:9;6008:2;5998:8;5995:16;5992:36;;;6024:1;6021;6014:12;5992:36;6053:55;6100:7;6089:8;6085:2;6081:17;6053:55;:::i;:::-;6044:7;6037:72;;6147:2;6143;6139:11;6133:18;6118:33;;6195:10;6186:7;6182:24;6173:7;6170:37;6160:65;;6221:1;6218;6211:12;6160:65;6241:16;;;6234:33;;;6276:24;;-1:-1:-1;6334:40:1;6362:11;;;6334:40;:::i;:::-;6329:2;6320:7;6316:16;6309:66;6411:42;6447:4;6443:2;6439:13;6411:42;:::i;:::-;6404:4;6395:7;6391:18;6384:70;6488:40;6524:2;6520;6516:11;6488:40;:::i;:::-;6483:2;6474:7;6470:16;6463:66;6564:42;6601:3;6597:2;6593:12;6564:42;:::i;:::-;6558:3;6549:7;6545:17;6538:69;6642:42;6679:3;6675:2;6671:12;6642:42;:::i;:::-;6636:3;6623:17;;6616:69;6701:14;;;6694:31;;;;-1:-1:-1;6705:5:1;;4932:1823;-1:-1:-1;;;;4932:1823:1:o;6947:1326::-;7122:2;7111:9;7104:21;7181:6;7175:13;7168:21;7161:29;7156:2;7145:9;7141:18;7134:57;7085:4;7238:2;7230:6;7226:15;7220:22;7280:4;7273;7262:9;7258:20;7251:34;7322:12;7316:19;7371:4;7366:2;7355:9;7351:18;7344:32;7413:14;7407:21;7465:4;7459:3;7448:9;7444:19;7437:33;7493:54;7542:3;7531:9;7527:19;7511:14;7493:54;:::i;:::-;7614:2;7594:23;;;7588:30;7620:10;7584:47;7578:3;7563:19;;7556:76;7669:21;;;7663:28;6827:4;6816:16;;7748:3;7733:19;;6804:29;7663:28;7479:68;-1:-1:-1;7808:4:1;7790:23;;7784:30;6827:4;6816:16;;7871:3;7856:19;;6804:29;7784:30;-1:-1:-1;7931:2:1;7913:21;;7907:28;6827:4;6816:16;;7992:4;7977:20;;6804:29;7907:28;-1:-1:-1;8053:3:1;8035:22;;8029:29;6916:18;6905:30;;8116:3;8101:19;;6893:43;8029:29;-1:-1:-1;8176:3:1;8162:12;8158:22;8152:29;8130:51;;8190:54;8239:3;8228:9;8224:19;8208:14;6916:18;6905:30;6893:43;;6840:102;8190:54;8261:6;6947:1326;-1:-1:-1;;;;;6947:1326:1:o;8278:206::-;8347:6;8400:2;8388:9;8379:7;8375:23;8371:32;8368:52;;;8416:1;8413;8406:12;8368:52;8439:39;8468:9;8439:39;:::i;8489:883::-;8584:6;8637:2;8625:9;8616:7;8612:23;8608:32;8605:52;;;8653:1;8650;8643:12;8605:52;8686:9;8680:16;8715:18;8756:2;8748:6;8745:14;8742:34;;;8772:1;8769;8762:12;8742:34;8795:22;;;;8851:4;8833:16;;;8829:27;8826:47;;;8869:1;8866;8859:12;8826:47;8895:22;;:::i;:::-;8941:9;;-1:-1:-1;;;;;8981:33:1;;8969:46;;8959:74;;9029:1;9026;9019:12;8959:74;9056:7;9049:5;9042:22;;9110:2;9106;9102:11;9096:18;9091:2;9084:5;9080:14;9073:42;9161:2;9157;9153:11;9147:18;9142:2;9135:5;9131:14;9124:42;9205:2;9201;9197:11;9191:18;9234:2;9224:8;9221:16;9218:36;;;9250:1;9247;9240:12;9218:36;9286:55;9333:7;9322:8;9318:2;9314:17;9286:55;:::i;:::-;9281:2;9270:14;;9263:79;-1:-1:-1;9274:5:1;8489:883;-1:-1:-1;;;;;8489:883:1:o;9377:184::-;9447:6;9500:2;9488:9;9479:7;9475:23;9471:32;9468:52;;;9516:1;9513;9506:12;9468:52;-1:-1:-1;9539:16:1;;9377:184;-1:-1:-1;9377:184:1:o;9566:611::-;9669:6;9677;9730:2;9718:9;9709:7;9705:23;9701:32;9698:52;;;9746:1;9743;9736:12;9698:52;9778:9;9772:16;9817:3;9810:5;9807:14;9797:42;;9835:1;9832;9825:12;9797:42;9907:2;9892:18;;9886:25;9858:5;;-1:-1:-1;9934:18:1;9923:30;;9920:50;;;9966:1;9963;9956:12;9920:50;9989:22;;10042:4;10034:13;;10030:27;-1:-1:-1;10020:55:1;;10071:1;10068;10061:12;10020:55;10094:77;10163:7;10158:2;10152:9;10147:2;10143;10139:11;10094:77;:::i;:::-;10084:87;;;9566:611;;;;;:::o;10182:222::-;10222:4;10250:1;10247;10244:8;10241:131;;;10294:10;10289:3;10285:20;10282:1;10275:31;10329:4;10326:1;10319:15;10357:4;10354:1;10347:15;10241:131;-1:-1:-1;10389:9:1;;10182:222::o;10851:380::-;10930:1;10926:12;;;;10973;;;10994:61;;11048:4;11040:6;11036:17;11026:27;;10994:61;11101:2;11093:6;11090:14;11070:18;11067:38;11064:161;;;11147:10;11142:3;11138:20;11135:1;11128:31;11182:4;11179:1;11172:15;11210:4;11207:1;11200:15;11064:161;;10851:380;;;:::o;11236:274::-;11365:3;11403:6;11397:13;11419:53;11465:6;11460:3;11453:4;11445:6;11441:17;11419:53;:::i;:::-;11488:16;;;;;11236:274;-1:-1:-1;;11236:274:1:o;11515:127::-;11576:10;11571:3;11567:20;11564:1;11557:31;11607:4;11604:1;11597:15;11631:4;11628:1;11621:15;11647:274;11731:6;11784:2;11772:9;11763:7;11759:23;11755:32;11752:52;;;11800:1;11797;11790:12;11752:52;11832:9;11826:16;11871:1;11864:5;11861:12;11851:40;;11887:1;11884;11877:12
Swarm Source
ipfs://2977364ad8abd7d2cccc99c3533c2c74e10d3020a7ee7f9d50867d1beed63689
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.