Contract 0xc3afd0e38cdea0e97dc33b037694d374f37048f6

Contract Overview

Balance:
0 BNB
Txn Hash
Block
From
To
Value [Txn Fee]
0x6ca4ae9c2c0e7296adefa7fe0174e31d89a0a79855c1a61a5d28d7c2b0d5cbe9109262162021-07-26 11:21:302 days 31 mins ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0xa51388d56c57753d85ad50ef953ae8286ae93cd927ab12ca76398850dc5997bd109252152021-07-26 10:31:272 days 1 hr ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00036019
0xe19bff4b78f120748736a1efe9e9342025033e8fc74e3b3ad66e6844e7cb04a5109251152021-07-26 10:26:272 days 1 hr ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00061732
0x06b893fc73dcb4ff9c8dc0b204b4db15f7035f8e8de0310f4f767a43be3ea009109237152021-07-26 9:16:272 days 2 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x4b668a140ce22908b16ef8b6f2d0db88be544455ee4c43bcf74c856279194373109227152021-07-26 8:26:272 days 3 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00040219
0x9cf50b430945a6d8b43e33bf4b672ac9f726b6065365fbc0d7cbdaffd1a5b381109226162021-07-26 8:21:302 days 3 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00077299
0xac6ed39419d90e1735a02d1c06c018a41bcc02bad57b1b3e2cafc4a4d762a45a109212162021-07-26 7:11:252 days 4 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x15304c1117fa758b12bb6228f4bc51b60a328b842398a22c32f2df6caf61fc2c109202332021-07-26 6:16:282 days 5 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0xe8645a4fe50dd7d06b4833c5a52a16b207e3adb13d3a53057e3ae9c7db92fd51109190312021-07-26 5:06:262 days 6 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x0f7ca39b7520367ce876aa0fe0b6ab1db5fc409ac683dcde303ab7685eb3fa1e109179432021-07-26 4:11:262 days 7 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x76566e2f94a165a92ac8b25dd3deafede8700470b575cd0373148513eac47208109165452021-07-26 3:01:322 days 8 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x9c5055adb8f4048db1279179eaca4d931d7f81dc41546dd8f2401ea9f0944022109154442021-07-26 2:06:262 days 9 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x303e448d4491bc4cbd615e70aa5ba4d7d1459b17fa591bbb0d252e2fbd46d62e109140442021-07-26 0:56:262 days 10 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x52dada0a11dec5225324dce0154200b801d35eb28d29da710e8c209bf7a1f50a109129452021-07-26 0:01:292 days 11 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x5f961756b71f8eefc79d5f7fd54e60b0b18c29d46df7ab7bdb22fc9627d7aeb1109115442021-07-25 22:51:262 days 13 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0xb1a7f76d2a818b57ebaa8fc052c0007e9d114ba0587b3d02f507f1ff9cf99389109104442021-07-25 21:56:262 days 13 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x8f02a0056905feb460921885d1a5f666ca9de2cbfa0c0783c141cb6d70b52832109090442021-07-25 20:46:262 days 15 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x5e466f65ccfa8de911f81c1808b3e23df7284a5d92ca14e81597e75601d1c05e109080912021-07-25 19:51:282 days 16 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x0e00ae39d633ab2b63431aedc259d72364681e35cc1ab073fbdb7fe4f75fb018109067012021-07-25 18:41:252 days 17 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x7e6320a9cac3e23ff46dc9dd106e7ee8ba40935c154ac32fb63556ee1fcb1acc109056012021-07-25 17:46:252 days 18 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0xd25e926a2527ffe33615cc3238dbdb82bbc1d3cf6a20cccfcefec61c794cdc5e109042022021-07-25 16:36:282 days 19 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0x3fee8379d9e6679b3bbc0803a42dc399066b4500734d6d8e884c3648ce13b050109031022021-07-25 15:41:282 days 20 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x3bd5267a6822a3ecbce3f95c0b64da10f121a7d5043baaf9769f1aa71172968d109017012021-07-25 14:31:252 days 21 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
0xfd4ef7ef325d8fb80fc584ab038b983792e7a5a2f0ade92b408808c9e4cb597b109006022021-07-25 13:36:282 days 22 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00064699
0x4e68ae9484d50c70a7092120c17398f796e30cd7fc54201bc7804d6f5dde3bb5108992022021-07-25 12:26:282 days 23 hrs ago0x5a4b4454edc88325fa1f88a8d9016e8b6eb3bec5 IN  0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB0.00035995
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x6ca4ae9c2c0e7296adefa7fe0174e31d89a0a79855c1a61a5d28d7c2b0d5cbe9109262162021-07-26 11:21:302 days 31 mins ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x6ca4ae9c2c0e7296adefa7fe0174e31d89a0a79855c1a61a5d28d7c2b0d5cbe9109262162021-07-26 11:21:302 days 31 mins ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xa51388d56c57753d85ad50ef953ae8286ae93cd927ab12ca76398850dc5997bd109252152021-07-26 10:31:272 days 1 hr ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xa51388d56c57753d85ad50ef953ae8286ae93cd927ab12ca76398850dc5997bd109252152021-07-26 10:31:272 days 1 hr ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xe19bff4b78f120748736a1efe9e9342025033e8fc74e3b3ad66e6844e7cb04a5109251152021-07-26 10:26:272 days 1 hr ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xe19bff4b78f120748736a1efe9e9342025033e8fc74e3b3ad66e6844e7cb04a5109251152021-07-26 10:26:272 days 1 hr ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x06b893fc73dcb4ff9c8dc0b204b4db15f7035f8e8de0310f4f767a43be3ea009109237152021-07-26 9:16:272 days 2 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x06b893fc73dcb4ff9c8dc0b204b4db15f7035f8e8de0310f4f767a43be3ea009109237152021-07-26 9:16:272 days 2 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x4b668a140ce22908b16ef8b6f2d0db88be544455ee4c43bcf74c856279194373109227152021-07-26 8:26:272 days 3 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x4b668a140ce22908b16ef8b6f2d0db88be544455ee4c43bcf74c856279194373109227152021-07-26 8:26:272 days 3 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x087398dfd6649fdbdf2154a1f72ad43f834637945f9f4c72afed955f315c97be109226972021-07-26 8:25:332 days 3 hrs ago 0xa5f8f4ac222b74ffe46b38f068adf97107fd3969 0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB
0x9cf50b430945a6d8b43e33bf4b672ac9f726b6065365fbc0d7cbdaffd1a5b381109226162021-07-26 8:21:302 days 3 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x9cf50b430945a6d8b43e33bf4b672ac9f726b6065365fbc0d7cbdaffd1a5b381109226162021-07-26 8:21:302 days 3 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xc8d9f57f60254ec2600af729e1e475f74720a2119ced0979292a95477bbdb562109224242021-07-26 8:11:542 days 3 hrs ago 0x7f8250162e707b425db89d14b90de3eefba55602 0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB
0xc8d9f57f60254ec2600af729e1e475f74720a2119ced0979292a95477bbdb562109224242021-07-26 8:11:542 days 3 hrs ago 0x7f8250162e707b425db89d14b90de3eefba55602 0xc3afd0e38cdea0e97dc33b037694d374f37048f60 BNB
0xac6ed39419d90e1735a02d1c06c018a41bcc02bad57b1b3e2cafc4a4d762a45a109212162021-07-26 7:11:252 days 4 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xac6ed39419d90e1735a02d1c06c018a41bcc02bad57b1b3e2cafc4a4d762a45a109212162021-07-26 7:11:252 days 4 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x15304c1117fa758b12bb6228f4bc51b60a328b842398a22c32f2df6caf61fc2c109202332021-07-26 6:16:282 days 5 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x15304c1117fa758b12bb6228f4bc51b60a328b842398a22c32f2df6caf61fc2c109202332021-07-26 6:16:282 days 5 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xe8645a4fe50dd7d06b4833c5a52a16b207e3adb13d3a53057e3ae9c7db92fd51109190312021-07-26 5:06:262 days 6 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0xe8645a4fe50dd7d06b4833c5a52a16b207e3adb13d3a53057e3ae9c7db92fd51109190312021-07-26 5:06:262 days 6 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x0f7ca39b7520367ce876aa0fe0b6ab1db5fc409ac683dcde303ab7685eb3fa1e109179432021-07-26 4:11:262 days 7 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x0f7ca39b7520367ce876aa0fe0b6ab1db5fc409ac683dcde303ab7685eb3fa1e109179432021-07-26 4:11:262 days 7 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x76566e2f94a165a92ac8b25dd3deafede8700470b575cd0373148513eac47208109165452021-07-26 3:01:322 days 8 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
0x76566e2f94a165a92ac8b25dd3deafede8700470b575cd0373148513eac47208109165452021-07-26 3:01:322 days 8 hrs ago 0xc3afd0e38cdea0e97dc33b037694d374f37048f6 0x938a797ce6cb5333903e1994fb19010d3d1985a20 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Oracle

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 150 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : Oracle.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Context.sol";

import "./interfaces/IOracle.sol";

contract Oracle is IOracle, Context {
    struct DataPoint {
        uint256 value;
        uint256 timestamp;
    }
    mapping(address => DataPoint) public data;

    address public immutable factory;

    uint256 public immutable maxTimeout;

    bytes32 internal constant MANAGER_ROLE = keccak256("MANAGER_ROLE");

    constructor(uint256 _maxTimeout, address _factory) {
        maxTimeout = _maxTimeout;
        factory = _factory;
    }

    modifier onlyManagerOrAdmin virtual {
        address sender = _msgSender();
        require(
            AccessControl(factory).hasRole(MANAGER_ROLE, sender) ||
                AccessControl(factory).hasRole(0x00, sender),
            "Access error"
        );
        _;
    }

    function uploadData(address[] calldata tokens, uint256[] calldata values) external override onlyManagerOrAdmin {
        require(tokens.length == values.length, "Oracle: Error inputs");

        // solhint-disable-next-line not-rely-on-time
        uint256 timestamp = block.timestamp;
        for (uint256 i = 0; i < tokens.length; i++) {
            data[tokens[i]].value = values[i];
            data[tokens[i]].timestamp = timestamp;
        }
    }

    function getData(address[] calldata tokens)
        external
        view
        override
        returns (bool[] memory isValidValue, uint256[] memory tokensPrices)
    {
        isValidValue = new bool[](tokens.length);
        tokensPrices = new uint256[](tokens.length);

        for (uint256 i = 0; i < tokens.length; i++) {
            DataPoint memory _data = data[tokens[i]];

            // solhint-disable-next-line not-rely-on-time
            if (block.timestamp - maxTimeout < _data.timestamp) {
                isValidValue[i] = true;
                tokensPrices[i] = _data.value;
            } else {
                isValidValue[i] = false;
            }
        }
    }

    function getTimestampsOfLastUploads(address[] calldata tokens)
        external
        view
        override
        returns (uint256[] memory timestamps)
    {
        timestamps = new uint256[](tokens.length);
        for (uint256 i = 0; i < tokens.length; i++) {
            timestamps[i] = data[tokens[i]].timestamp;
        }
    }
}

File 2 of 7 : IOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IOracle {
    function getData(address[] calldata tokens)
        external
        view
        returns (bool[] memory isValidValue, uint256[] memory tokensPrices);

    function uploadData(address[] calldata tokens, uint256[] calldata values) external;

    function getTimestampsOfLastUploads(address[] calldata tokens)
        external
        view
        returns (uint256[] memory timestamps);
}

File 3 of 7 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function grantRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function renounceRole(bytes32 role, address account) external;
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping (address => bool) members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if(!hasRole(role, account)) {
            revert(string(abi.encodePacked(
                "AccessControl: account ",
                Strings.toHexString(uint160(account), 20),
                " is missing role ",
                Strings.toHexString(uint256(role), 32)
            )));
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 4 of 7 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 5 of 7 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 6 of 7 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 7 of 7 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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);
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 150
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_maxTimeout","type":"uint256"},{"internalType":"address","name":"_factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"data","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getData","outputs":[{"internalType":"bool[]","name":"isValidValue","type":"bool[]"},{"internalType":"uint256[]","name":"tokensPrices","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getTimestampsOfLastUploads","outputs":[{"internalType":"uint256[]","name":"timestamps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTimeout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"uploadData","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b50604051610a99380380610a9983398101604081905261002f9161004a565b60a09190915260601b6001600160601b031916608052610085565b6000806040838503121561005c578182fd5b825160208401519092506001600160a01b038116811461007a578182fd5b809150509250929050565b60805160601c60a0516109d86100c1600039600081816096015261029d01526000818161013c015281816104c8015261057001526109d86000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80635ffab0e31461006757806368b85aa5146100915780638a551b0f146100c6578063908e48b5146100e6578063b90d3d0c146100fb578063c45a015514610137575b600080fd5b61007a6100753660046107eb565b610176565b6040516100889291906108ee565b60405180910390f35b6100b87f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610088565b6100d96100d43660046107eb565b61037d565b6040516100889190610947565b6100f96100f436600461082b565b61047d565b005b6101226101093660046107bd565b6000602081905290815260409020805460019091015482565b60408051928352602083019190915201610088565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610088565b6060808267ffffffffffffffff8111156101a057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156101c9578160200160208202803683370190505b5091508267ffffffffffffffff8111156101f357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561021c578160200160208202803683370190505b50905060005b8381101561037557600080600087878581811061024f57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061026491906107bd565b6001600160a01b0316815260208082019290925260409081016000208151808301909252805482526001015491810182905291506102c27f00000000000000000000000000000000000000000000000000000000000000004261095a565b101561032f5760018483815181106102ea57634e487b7160e01b600052603260045260246000fd5b911515602092830291909101909101528051835184908490811061031e57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050610362565b600084838151811061035157634e487b7160e01b600052603260045260246000fd5b911515602092830291909101909101525b508061036d81610971565b915050610222565b509250929050565b60608167ffffffffffffffff8111156103a657634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156103cf578160200160208202803683370190505b50905060005b828110156104765760008085858481811061040057634e487b7160e01b600052603260045260246000fd5b905060200201602081019061041591906107bd565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015482828151811061045957634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061046e81610971565b9150506103d5565b5092915050565b600033604051632474521560e21b81527f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0860048201526001600160a01b0380831660248301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906391d148549060440160206040518083038186803b15801561050c57600080fd5b505afa158015610520573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105449190610894565b806105ea5750604051632474521560e21b8152600060048201526001600160a01b0382811660248301527f000000000000000000000000000000000000000000000000000000000000000016906391d148549060440160206040518083038186803b1580156105b257600080fd5b505afa1580156105c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ea9190610894565b61062a5760405162461bcd60e51b815260206004820152600c60248201526b20b1b1b2b9b99032b93937b960a11b60448201526064015b60405180910390fd5b8382146106705760405162461bcd60e51b81526020600482015260146024820152734f7261636c653a204572726f7220696e7075747360601b6044820152606401610621565b4260005b8581101561076a5784848281811061069c57634e487b7160e01b600052603260045260246000fd5b905060200201356000808989858181106106c657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106db91906107bd565b6001600160a01b03166001600160a01b03168152602001908152602001600020600001819055508160008089898581811061072657634e487b7160e01b600052603260045260246000fd5b905060200201602081019061073b91906107bd565b6001600160a01b031681526020810191909152604001600020600101558061076281610971565b915050610674565b50505050505050565b60008083601f840112610784578182fd5b50813567ffffffffffffffff81111561079b578182fd5b6020830191508360208260051b85010111156107b657600080fd5b9250929050565b6000602082840312156107ce578081fd5b81356001600160a01b03811681146107e4578182fd5b9392505050565b600080602083850312156107fd578081fd5b823567ffffffffffffffff811115610813578182fd5b61081f85828601610773565b90969095509350505050565b60008060008060408587031215610840578182fd5b843567ffffffffffffffff80821115610857578384fd5b61086388838901610773565b9096509450602087013591508082111561087b578384fd5b5061088887828801610773565b95989497509550505050565b6000602082840312156108a5578081fd5b815180151581146107e4578182fd5b6000815180845260208085019450808401835b838110156108e3578151875295820195908201906001016108c7565b509495945050505050565b604080825283519082018190526000906020906060840190828701845b8281101561092957815115158452928401929084019060010161090b565b5050508381038285015261093d81866108b4565b9695505050505050565b6020815260006107e460208301846108b4565b60008282101561096c5761096c61098c565b500390565b60006000198214156109855761098561098c565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220dd213b0d947788b72f1a708075c1aa00e7e3c9f9b5a9cffcf35f743e09b3474464736f6c634300080400330000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000938a797ce6cb5333903e1994fb19010d3d1985a2

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000938a797ce6cb5333903e1994fb19010d3d1985a2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000001c20
Arg [1] : 000000000000000000000000938a797ce6cb5333903e1994fb19010d3d1985a2


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading