ETH Price: $2,069.25 (+0.77%)
Gas: 0.04 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Fetch Data115650222021-01-01 0:00:221871 days ago1609459222IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0056780546.00000145
Fetch Data115650222021-01-01 0:00:221871 days ago1609459222IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0056112146.00000145
Fetch Data115650222021-01-01 0:00:221871 days ago1609459222IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0056780546.00000145
Fetch Data115650222021-01-01 0:00:221871 days ago1609459222IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0056112146.00000145
Fetch Data115650222021-01-01 0:00:221871 days ago1609459222IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0056112146.00000145
Fetch Data115650222021-01-01 0:00:221871 days ago1609459222IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0056112146.00000145
Fetch Data114218422020-12-09 23:59:541893 days ago1607558394IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0032090226
Fetch Data113851962020-12-04 9:04:131898 days ago1607072653IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0036310347
Fetch Data113632702020-12-01 0:00:061902 days ago1606780806IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046836838.4
Fetch Data113632702020-12-01 0:00:061902 days ago1606780806IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0047394838.4
Fetch Data113632702020-12-01 0:00:061902 days ago1606780806IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046836838.4
Fetch Data113632702020-12-01 0:00:061902 days ago1606780806IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046836838.4
Fetch Data113438542020-11-28 0:51:521905 days ago1606524712IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0013981118.1
Fetch Data112942772020-11-20 10:00:441912 days ago1605866444IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0049443864
Fetch Data112501662020-11-13 15:28:541919 days ago1605281334IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0061795280
Fetch Data112034852020-11-06 11:18:131926 days ago1604661493IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046353660
Fetch Data111723372020-11-01 16:45:471931 days ago1604249147IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046905638
Fetch Data111723362020-11-01 16:45:321931 days ago1604249132IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046353538
Fetch Data111723332020-11-01 16:45:091931 days ago1604249109IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046353538
Fetch Data111723312020-11-01 16:44:391931 days ago1604249079IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046353538
Fetch Data111723242020-11-01 16:42:351931 days ago1604248955IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0046353538
Fetch Data111571852020-10-30 8:48:161933 days ago1604047696IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0043256656
Fetch Data111111782020-10-23 7:27:141940 days ago1603438034IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0034765245
Fetch Data110657112020-10-16 7:59:201947 days ago1602835160IN
Opium.Team: Oracle Aggregator V1
0 ETH0.0043978957
Fetch Data110657072020-10-16 7:57:471947 days ago1602835067IN
Opium.Team: Oracle Aggregator V1
0 ETH0.004402957
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
-110505052020-10-14 0:13:481950 days ago1602634428
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109670042020-10-01 0:29:481963 days ago1601512188
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109670042020-10-01 0:29:481963 days ago1601512188
Opium.Team: Oracle Aggregator V1
0.01202519 ETH
-109670042020-10-01 0:29:481963 days ago1601512188
Opium.Team: Oracle Aggregator V1
0.01202519 ETH
-109670042020-10-01 0:29:481963 days ago1601512188
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109670042020-10-01 0:29:481963 days ago1601512188
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109646562020-09-30 15:50:331963 days ago1601481033
Opium.Team: Oracle Aggregator V1
0.01202519 ETH
-109646562020-09-30 15:50:331963 days ago1601481033
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109646562020-09-30 15:50:331963 days ago1601481033
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109646562020-09-30 15:50:331963 days ago1601481033
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-109646562020-09-30 15:50:331963 days ago1601481033
Opium.Team: Oracle Aggregator V1
0.00402519 ETH
-105765422020-08-01 22:15:312023 days ago1596320131
Opium.Team: Oracle Aggregator V1
0.01203135 ETH
-105765422020-08-01 22:15:312023 days ago1596320131
Opium.Team: Oracle Aggregator V1
0.00403135 ETH
-105765422020-08-01 22:15:312023 days ago1596320131
Opium.Team: Oracle Aggregator V1
0.00403135 ETH
-105765422020-08-01 22:15:312023 days ago1596320131
Opium.Team: Oracle Aggregator V1
0.00403135 ETH
-105765422020-08-01 22:15:312023 days ago1596320131
Opium.Team: Oracle Aggregator V1
0.00403135 ETH
-104672112020-07-16 0:01:582040 days ago1594857718
Opium.Team: Oracle Aggregator V1
0.01204152 ETH
-103767142020-07-02 0:06:062054 days ago1593648366
Opium.Team: Oracle Aggregator V1
0.00404152 ETH
-103767142020-07-02 0:06:062054 days ago1593648366
Opium.Team: Oracle Aggregator V1
0.00404152 ETH
-103767142020-07-02 0:06:062054 days ago1593648366
Opium.Team: Oracle Aggregator V1
0.00404152 ETH
-101767042020-06-01 0:02:492085 days ago1590969769
Opium.Team: Oracle Aggregator V1
0.01205081 ETH
-101766902020-06-01 0:00:012085 days ago1590969601
Opium.Team: Oracle Aggregator V1
0.00405081 ETH
-101766902020-06-01 0:00:012085 days ago1590969601
Opium.Team: Oracle Aggregator V1
0.00405081 ETH
-101766902020-06-01 0:00:012085 days ago1590969601
Opium.Team: Oracle Aggregator V1
0.00405081 ETH
-101766902020-06-01 0:00:012085 days ago1590969601
Opium.Team: Oracle Aggregator V1
0.00405081 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OracleAggregator

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-03-24
*/

/**

  Source code of Opium Protocol
  Web https://opium.network
  Telegram https://t.me/opium_network
  Twitter https://twitter.com/opium_network

 */

// File: LICENSE

/**

The software and documentation available in this repository (the "Software") is protected by copyright law and accessible pursuant to the license set forth below. Copyright © 2020 Blockeys BV. All rights reserved.

Permission is hereby granted, free of charge, to any person or organization obtaining the Software (the “Licensee”) to privately study, review, and analyze the Software. Licensee shall not use the Software for any other purpose. Licensee shall not modify, transfer, assign, share, or sub-license the Software or any derivative works of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/


// File: openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol

pragma solidity ^0.5.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 */
contract ReentrancyGuard {
    // counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    constructor () internal {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: contracts/Errors/OracleAggregatorErrors.sol

pragma solidity 0.5.16;

contract OracleAggregatorErrors {
    string constant internal ERROR_ORACLE_AGGREGATOR_NOT_ENOUGH_ETHER = "ORACLE_AGGREGATOR:NOT_ENOUGH_ETHER";

    string constant internal ERROR_ORACLE_AGGREGATOR_QUERY_WAS_ALREADY_MADE = "ORACLE_AGGREGATOR:QUERY_WAS_ALREADY_MADE";

    string constant internal ERROR_ORACLE_AGGREGATOR_DATA_DOESNT_EXIST = "ORACLE_AGGREGATOR:DATA_DOESNT_EXIST";

    string constant internal ERROR_ORACLE_AGGREGATOR_DATA_ALREADY_EXIST = "ORACLE_AGGREGATOR:DATA_ALREADY_EXIST";
}

// File: contracts/Interface/IOracleId.sol

pragma solidity 0.5.16;

/// @title Opium.Interface.IOracleId contract is an interface that every oracleId should implement
interface IOracleId {
    /// @notice Requests data from `oracleId` one time
    /// @param timestamp uint256 Timestamp at which data are needed
    function fetchData(uint256 timestamp) external payable;

    /// @notice Requests data from `oracleId` multiple times
    /// @param timestamp uint256 Timestamp at which data are needed for the first time
    /// @param period uint256 Period in seconds between multiple timestamps
    /// @param times uint256 How many timestamps are requested
    function recursivelyFetchData(uint256 timestamp, uint256 period, uint256 times) external payable;

    /// @notice Requests and returns price in ETH for one request. This function could be called as `view` function. Oraclize API for price calculations restricts making this function as view.
    /// @return fetchPrice uint256 Price of one data request in ETH
    function calculateFetchPrice() external returns (uint256 fetchPrice);

    // Event with oracleId metadata JSON string (for DIB.ONE derivative explorer)
    event MetadataSet(string metadata);
}

// File: contracts/OracleAggregator.sol

pragma solidity 0.5.16;





/// @title Opium.OracleAggregator contract requests and caches the data from `oracleId`s and provides them to the Core for positions execution
contract OracleAggregator is OracleAggregatorErrors, ReentrancyGuard {
    using SafeMath for uint256;

    // Storage for the `oracleId` results
    // dataCache[oracleId][timestamp] => data
    mapping (address => mapping(uint256 => uint256)) public dataCache;

    // Flags whether data were provided
    // dataExist[oracleId][timestamp] => bool
    mapping (address => mapping(uint256 => bool)) public dataExist;

    // Flags whether data were requested
    // dataRequested[oracleId][timestamp] => bool
    mapping (address => mapping(uint256 => bool)) public dataRequested;

    // MODIFIERS

    /// @notice Checks whether enough ETH were provided withing data request to proceed
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @param times uint256 How many times the `oracleId` is being requested
    modifier enoughEtherProvided(address oracleId, uint256 times) {
        // Calling Opium.IOracleId function to get the data fetch price per one request
        uint256 oneTimePrice = calculateFetchPrice(oracleId);

        // Checking if enough ether was provided for `times` amount of requests
        require(msg.value >= oneTimePrice.mul(times), ERROR_ORACLE_AGGREGATOR_NOT_ENOUGH_ETHER);
        _;
    }

    // PUBLIC FUNCTIONS

    /// @notice Requests data from `oracleId` one time
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @param timestamp uint256 Timestamp at which data are needed
    function fetchData(address oracleId, uint256 timestamp) public payable nonReentrant enoughEtherProvided(oracleId, 1) {
        // Check if was not requested before and mark as requested
        _registerQuery(oracleId, timestamp);

        // Call the `oracleId` contract and transfer ETH
        IOracleId(oracleId).fetchData.value(msg.value)(timestamp);
    }

    /// @notice Requests data from `oracleId` multiple times
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @param timestamp uint256 Timestamp at which data are needed for the first time
    /// @param period uint256 Period in seconds between multiple timestamps
    /// @param times uint256 How many timestamps are requested
    function recursivelyFetchData(address oracleId, uint256 timestamp, uint256 period, uint256 times) public payable nonReentrant enoughEtherProvided(oracleId, times) {
        // Check if was not requested before and mark as requested in loop for each timestamp
        for (uint256 i = 0; i < times; i++) {
            _registerQuery(oracleId, timestamp + period * i);
        }

        // Call the `oracleId` contract and transfer ETH
        IOracleId(oracleId).recursivelyFetchData.value(msg.value)(timestamp, period, times);
    }

    /// @notice Receives and caches data from `msg.sender`
    /// @param timestamp uint256 Timestamp of data
    /// @param data uint256 Data itself
    function __callback(uint256 timestamp, uint256 data) public {
        // Don't allow to push data twice
        require(!dataExist[msg.sender][timestamp], ERROR_ORACLE_AGGREGATOR_DATA_ALREADY_EXIST);

        // Saving data
        dataCache[msg.sender][timestamp] = data;

        // Flagging that data were received
        dataExist[msg.sender][timestamp] = true;
    }

    /// @notice Requests and returns price in ETH for one request. This function could be called as `view` function. Oraclize API for price calculations restricts making this function as view.
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @return fetchPrice uint256 Price of one data request in ETH
    function calculateFetchPrice(address oracleId) public returns(uint256 fetchPrice) {
        fetchPrice = IOracleId(oracleId).calculateFetchPrice();
    }

    // PRIVATE FUNCTIONS

    /// @notice Checks if data was not requested and provided before and marks as requested
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @param timestamp uint256 Timestamp at which data are requested
    function _registerQuery(address oracleId, uint256 timestamp) private {
        // Check if data was not requested and provided yet
        require(!dataRequested[oracleId][timestamp] && !dataExist[oracleId][timestamp], ERROR_ORACLE_AGGREGATOR_QUERY_WAS_ALREADY_MADE);

        // Mark as requested
        dataRequested[oracleId][timestamp] = true;
    }

    // VIEW FUNCTIONS

    /// @notice Returns cached data if they exist, or reverts with an error
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @param timestamp uint256 Timestamp at which data were requested
    /// @return dataResult uint256 Cached data provided by `oracleId`
    function getData(address oracleId, uint256 timestamp) public view returns(uint256 dataResult) {
        // Check if Opium.OracleAggregator has data
        require(hasData(oracleId, timestamp), ERROR_ORACLE_AGGREGATOR_DATA_DOESNT_EXIST);

        // Return cached data
        dataResult = dataCache[oracleId][timestamp];
    }

    /// @notice Getter for dataExist mapping
    /// @param oracleId address Address of the `oracleId` smart contract
    /// @param timestamp uint256 Timestamp at which data were requested
    /// @param result bool Returns whether data were provided already
    function hasData(address oracleId, uint256 timestamp) public view returns(bool result) {
        return dataExist[oracleId][timestamp];
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"data","type":"uint256"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"oracleId","type":"address"}],"name":"calculateFetchPrice","outputs":[{"internalType":"uint256","name":"fetchPrice","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dataCache","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dataExist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dataRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"oracleId","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"fetchData","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"oracleId","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getData","outputs":[{"internalType":"uint256","name":"dataResult","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"oracleId","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"hasData","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"oracleId","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"},{"internalType":"uint256","name":"times","type":"uint256"}],"name":"recursivelyFetchData","outputs":[],"payable":true,"stateMutability":"payable","type":"function"}]

60806040526001600055610a3f806100186000396000f3fe6080604052600436106100865760003560e01c80637cfe193a116100595780637cfe193a14610188578063904760c5146101b457806394194f2c146101ed578063b261790914610226578063c8384d2f1461025e57610086565b8063054851721461008b5780632979d025146100d05780633102e5ab146101095780633c0ef8f21461013b575b600080fd5b34801561009757600080fd5b506100be600480360360208110156100ae57600080fd5b50356001600160a01b0316610297565b60408051918252519081900360200190f35b3480156100dc57600080fd5b506100be600480360360408110156100f357600080fd5b506001600160a01b038135169060200135610306565b34801561011557600080fd5b506101396004803603604081101561012c57600080fd5b50803590602001356103dd565b005b34801561014757600080fd5b506101746004803603604081101561015e57600080fd5b506001600160a01b0381351690602001356104a0565b604080519115158252519081900360200190f35b6101396004803603604081101561019e57600080fd5b506001600160a01b0381351690602001356104c0565b3480156101c057600080fd5b50610174600480360360408110156101d757600080fd5b506001600160a01b03813516906020013561061b565b3480156101f957600080fd5b506100be6004803603604081101561021057600080fd5b506001600160a01b03813516906020013561063b565b6101396004803603608081101561023c57600080fd5b506001600160a01b038135169060208101359060408101359060600135610658565b34801561026a57600080fd5b506101746004803603604081101561028157600080fd5b506001600160a01b0381351690602001356107dc565b6000816001600160a01b0316637bc9f04a6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102d457600080fd5b505af11580156102e8573d6000803e3d6000fd5b505050506040513d60208110156102fe57600080fd5b505192915050565b600061031283836107dc565b6040518060600160405280602381526020016109e860239139906103b45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610379578181015183820152602001610361565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50506001600160a01b039091166000908152600160209081526040808320938352929052205490565b33600090815260026020908152604080832085845282529182902054825160608101909352602480845260ff90911615929161095990830139906104625760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b50336000818152600160208181526040808420878552825280842095909555928252600283528382209482529390915220805460ff19169091179055565b600360209081526000928352604080842090915290825290205460ff1681565b600080546001908101808355918491906104d983610297565b90506104eb818363ffffffff61080a16565b3410156040518060600160405280602281526020016109c660229139906105535760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b5061055e868661086a565b856001600160a01b031663864905ba34876040518363ffffffff1660e01b8152600401808281526020019150506000604051808303818588803b1580156105a457600080fd5b505af11580156105b8573d6000803e3d6000fd5b50505050505050506000548114610616576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050565b600260209081526000928352604080842090915290825290205460ff1681565b600160209081526000928352604080842090915290825290205481565b60008054600101808255908590839061067083610297565b9050610682818363ffffffff61080a16565b3410156040518060600160405280602281526020016109c660229139906106ea5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b5060005b8581101561070c57610704898289028a0161086a565b6001016106ee565b50876001600160a01b031663760768db348989896040518563ffffffff1660e01b81526004018084815260200183815260200182815260200193505050506000604051808303818588803b15801561076357600080fd5b505af1158015610777573d6000803e3d6000fd5b505050505050505060005481146107d5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050505050565b6001600160a01b038216600090815260026020908152604080832084845290915290205460ff165b92915050565b60008261081957506000610804565b8282028284828161082657fe5b04146108635760405162461bcd60e51b81526004018080602001828103825260218152602001806109a56021913960400191505060405180910390fd5b9392505050565b6001600160a01b038216600090815260036020908152604080832084845290915290205460ff161580156108c257506001600160a01b038216600090815260026020908152604080832084845290915290205460ff16155b60405180606001604052806028815260200161097d60289139906109275760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b506001600160a01b03909116600090815260036020908152604080832093835292905220805460ff1916600117905556fe4f5241434c455f41474752454741544f523a444154415f414c52454144595f45584953544f5241434c455f41474752454741544f523a51554552595f5741535f414c52454144595f4d414445536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f5241434c455f41474752454741544f523a4e4f545f454e4f5547485f45544845524f5241434c455f41474752454741544f523a444154415f444f45534e545f4558495354a265627a7a72315820ff34c49241f57a46abd291d066d4a40409c85b181fda838489c2dd703883c60864736f6c63430005100032

Deployed Bytecode

0x6080604052600436106100865760003560e01c80637cfe193a116100595780637cfe193a14610188578063904760c5146101b457806394194f2c146101ed578063b261790914610226578063c8384d2f1461025e57610086565b8063054851721461008b5780632979d025146100d05780633102e5ab146101095780633c0ef8f21461013b575b600080fd5b34801561009757600080fd5b506100be600480360360208110156100ae57600080fd5b50356001600160a01b0316610297565b60408051918252519081900360200190f35b3480156100dc57600080fd5b506100be600480360360408110156100f357600080fd5b506001600160a01b038135169060200135610306565b34801561011557600080fd5b506101396004803603604081101561012c57600080fd5b50803590602001356103dd565b005b34801561014757600080fd5b506101746004803603604081101561015e57600080fd5b506001600160a01b0381351690602001356104a0565b604080519115158252519081900360200190f35b6101396004803603604081101561019e57600080fd5b506001600160a01b0381351690602001356104c0565b3480156101c057600080fd5b50610174600480360360408110156101d757600080fd5b506001600160a01b03813516906020013561061b565b3480156101f957600080fd5b506100be6004803603604081101561021057600080fd5b506001600160a01b03813516906020013561063b565b6101396004803603608081101561023c57600080fd5b506001600160a01b038135169060208101359060408101359060600135610658565b34801561026a57600080fd5b506101746004803603604081101561028157600080fd5b506001600160a01b0381351690602001356107dc565b6000816001600160a01b0316637bc9f04a6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102d457600080fd5b505af11580156102e8573d6000803e3d6000fd5b505050506040513d60208110156102fe57600080fd5b505192915050565b600061031283836107dc565b6040518060600160405280602381526020016109e860239139906103b45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610379578181015183820152602001610361565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50506001600160a01b039091166000908152600160209081526040808320938352929052205490565b33600090815260026020908152604080832085845282529182902054825160608101909352602480845260ff90911615929161095990830139906104625760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b50336000818152600160208181526040808420878552825280842095909555928252600283528382209482529390915220805460ff19169091179055565b600360209081526000928352604080842090915290825290205460ff1681565b600080546001908101808355918491906104d983610297565b90506104eb818363ffffffff61080a16565b3410156040518060600160405280602281526020016109c660229139906105535760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b5061055e868661086a565b856001600160a01b031663864905ba34876040518363ffffffff1660e01b8152600401808281526020019150506000604051808303818588803b1580156105a457600080fd5b505af11580156105b8573d6000803e3d6000fd5b50505050505050506000548114610616576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050565b600260209081526000928352604080842090915290825290205460ff1681565b600160209081526000928352604080842090915290825290205481565b60008054600101808255908590839061067083610297565b9050610682818363ffffffff61080a16565b3410156040518060600160405280602281526020016109c660229139906106ea5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b5060005b8581101561070c57610704898289028a0161086a565b6001016106ee565b50876001600160a01b031663760768db348989896040518563ffffffff1660e01b81526004018084815260200183815260200182815260200193505050506000604051808303818588803b15801561076357600080fd5b505af1158015610777573d6000803e3d6000fd5b505050505050505060005481146107d5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050505050565b6001600160a01b038216600090815260026020908152604080832084845290915290205460ff165b92915050565b60008261081957506000610804565b8282028284828161082657fe5b04146108635760405162461bcd60e51b81526004018080602001828103825260218152602001806109a56021913960400191505060405180910390fd5b9392505050565b6001600160a01b038216600090815260036020908152604080832084845290915290205460ff161580156108c257506001600160a01b038216600090815260026020908152604080832084845290915290205460ff16155b60405180606001604052806028815260200161097d60289139906109275760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610379578181015183820152602001610361565b506001600160a01b03909116600090815260036020908152604080832093835292905220805460ff1916600117905556fe4f5241434c455f41474752454741544f523a444154415f414c52454144595f45584953544f5241434c455f41474752454741544f523a51554552595f5741535f414c52454144595f4d414445536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f5241434c455f41474752454741544f523a4e4f545f454e4f5547485f45544845524f5241434c455f41474752454741544f523a444154415f444f45534e545f4558495354a265627a7a72315820ff34c49241f57a46abd291d066d4a40409c85b181fda838489c2dd703883c60864736f6c63430005100032

Deployed Bytecode Sourcemap

10388:5550:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14069:155;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14069:155:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14069:155:0;-1:-1:-1;;;;;14069:155:0;;:::i;:::-;;;;;;;;;;;;;;;;15187:333;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15187:333:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;15187:333:0;;;;;;;;:::i;13343:381::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13343:381:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13343:381:0;;;;;;;:::i;:::-;;10915:66;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10915:66:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;10915:66:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;11901:367;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;11901:367:0;;;;;;;;:::i;10751:62::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10751:62:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;10751:62:0;;;;;;;;:::i;10589:65::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10589:65:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;10589:65:0;;;;;;;;:::i;12641:541::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;12641:541:0;;;;;;;;;;;;;;;;;;:::i;15792:143::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15792:143:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;15792:143:0;;;;;;;;:::i;14069:155::-;14131:18;14185:8;-1:-1:-1;;;;;14175:39:0;;:41;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14175:41:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14175:41:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;14175:41:0;;14069:155;-1:-1:-1;;14069:155:0:o;15187:333::-;15261:18;15353:28;15361:8;15371:9;15353:7;:28::i;:::-;15383:41;;;;;;;;;;;;;;;;;15345:80;;;;;-1:-1:-1;;;15345:80:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;15345:80:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;15482:19:0;;;;;;;:9;:19;;;;;;;;:30;;;;;;;;;15187:333::o;13343:381::-;13476:10;13466:21;;;;:9;:21;;;;;;;;:32;;;;;;;;;;13500:42;;;;;;;;;;;;13466:32;;;;13465:33;;13500:42;;;;;;13457:86;;;;;-1:-1:-1;;;13457:86:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;13457:86:0;-1:-1:-1;13590:10:0;13580:21;;;;:9;:21;;;;;;;;:32;;;;;;;;:39;;;;13677:21;;;:9;:21;;;;;:32;;;;;;;;:39;;-1:-1:-1;;13677:39:0;;;;;;13343:381::o;10915:66::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;11901:367::-;2632:13;:18;;2649:1;2632:18;;;;;;;12005:8;;2649:1;11437:29;12005:8;11437:19;:29::i;:::-;11414:52;-1:-1:-1;11581:23:0;11414:52;11598:5;11581:23;:16;:23;:::i;:::-;11568:9;:36;;11606:40;;;;;;;;;;;;;;;;;11560:87;;;;;-1:-1:-1;;;11560:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;11560:87:0;;12097:35;12112:8;12122:9;12097:14;:35::i;:::-;12213:8;-1:-1:-1;;;;;12203:29:0;;12239:9;12250;12203:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12203:57:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12203:57:0;;;;;2708:1;;;2744:13;;2728:12;:29;2720:73;;;;;-1:-1:-1;;;2720:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;11901:367;;;:::o;10751:62::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;10589:65::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;12641:541::-;2632:13;:18;;2649:1;2632:18;;;;;12787:8;;12797:5;;11437:29;12787:8;11437:19;:29::i;:::-;11414:52;-1:-1:-1;11581:23:0;11414:52;11598:5;11581:23;:16;:23;:::i;:::-;11568:9;:36;;11606:40;;;;;;;;;;;;;;;;;11560:87;;;;;-1:-1:-1;;;11560:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;11560:87:0;-1:-1:-1;12915:9:0;12910:111;12934:5;12930:1;:9;12910:111;;;12961:48;12976:8;13007:1;12998:6;:10;12986:9;:22;12961:14;:48::i;:::-;12941:3;;12910:111;;;;13101:8;-1:-1:-1;;;;;13091:40:0;;13138:9;13149;13160:6;13168:5;13091:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13091:83:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13091:83:0;;;;;2708:1;;;2744:13;;2728:12;:29;2720:73;;;;;-1:-1:-1;;;2720:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;12641:541;;;;;:::o;15792:143::-;-1:-1:-1;;;;;15897:19:0;;15866:11;15897:19;;;:9;:19;;;;;;;;:30;;;;;;;;;;;15792:143;;;;;:::o;5101:471::-;5159:7;5404:6;5400:47;;-1:-1:-1;5434:1:0;5427:8;;5400:47;5471:5;;;5475:1;5471;:5;:1;5495:5;;;;;:10;5487:56;;;;-1:-1:-1;;;5487:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5563:1;5101:471;-1:-1:-1;;;5101:471:0:o;14499:360::-;-1:-1:-1;;;;;14649:23:0;;;;;;:13;:23;;;;;;;;:34;;;;;;;;;;;14648:35;:70;;;;-1:-1:-1;;;;;;14688:19:0;;;;;;:9;:19;;;;;;;;:30;;;;;;;;;;;14687:31;14648:70;14720:46;;;;;;;;;;;;;;;;;14640:127;;;;;-1:-1:-1;;;14640:127:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;14640:127:0;-1:-1:-1;;;;;;14810:23:0;;;;;;;:13;:23;;;;;;;;:34;;;;;;;:41;;-1:-1:-1;;14810:41:0;14847:4;14810:41;;;14499:360::o

Swarm Source

bzzr://ff34c49241f57a46abd291d066d4a40409c85b181fda838489c2dd703883c608

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Caches oracles data for Opium Protocol.

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.