ETH Price: $2,204.85 (+3.77%)

Contract

0xA55d9ef16Af921b70Fed1421C1D298Ca5A3a18F1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Relay148899822022-06-02 8:41:181003 days ago1654159278IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0117637557.52505121
Relay148897372022-06-02 7:41:211003 days ago1654155681IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0175080485.59968237
Relay148894862022-06-02 6:41:191003 days ago1654152079IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0098981148.39633927
Relay148892312022-06-02 5:41:121003 days ago1654148472IN
0xA55d9ef1...a5A3a18F1
0 ETH0.009727447.58400153
Relay148889842022-06-02 4:40:321003 days ago1654144832IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0084798241.47141243
Relay148887352022-06-02 3:40:581003 days ago1654141258IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0092897445.42708528
Relay148884572022-06-02 2:41:211003 days ago1654137681IN
0xA55d9ef1...a5A3a18F1
0 ETH0.014848472.60476458
Relay148881932022-06-02 1:41:141003 days ago1654134074IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0141444569.16670439
Relay148879692022-06-02 0:41:021003 days ago1654130462IN
0xA55d9ef1...a5A3a18F1
0 ETH0.016205579.25923204
Relay148877822022-06-01 23:57:591003 days ago1654127879IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0011774135.76927103
Relay148877162022-06-01 23:41:001003 days ago1654126860IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0091421944.7029223
Relay148874452022-06-01 22:41:061003 days ago1654123266IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0192428794.08708298
Relay148871922022-06-01 21:40:591003 days ago1654119659IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0152005874.31814697
Relay148869302022-06-01 20:41:021003 days ago1654116062IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0159615178.0522046
Relay148869022022-06-01 20:36:031003 days ago1654115763IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0038673117.57242403
Relay148868952022-06-01 20:33:541003 days ago1654115634IN
0xA55d9ef1...a5A3a18F1
0 ETH0.00343866104.42655747
Relay148866522022-06-01 19:41:201003 days ago1654112480IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0160412778.4375905
Relay148864072022-06-01 18:41:001003 days ago1654108860IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0137720367.33370763
Relay148861302022-06-01 17:41:381003 days ago1654105298IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0156780976.65727166
Relay148858722022-06-01 16:41:211003 days ago1654101681IN
0xA55d9ef1...a5A3a18F1
0 ETH0.02202536107.67928888
Relay148856942022-06-01 15:55:591003 days ago1654098959IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0021497165.35479347
Relay148856372022-06-01 15:41:351003 days ago1654098095IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0096457647.16522946
Relay148853842022-06-01 14:41:091003 days ago1654094469IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0140434968.66094935
Relay148853682022-06-01 14:37:211003 days ago1654094241IN
0xA55d9ef1...a5A3a18F1
0 ETH0.002897772.33057493
Relay148851002022-06-01 13:41:111003 days ago1654090871IN
0xA55d9ef1...a5A3a18F1
0 ETH0.0084092841.12160892
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StdReferenceBasic

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license
File 1 of 8 : StdReferenceBasic.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity 0.8.13;

import {StdReferenceBase} from "StdReferenceBase.sol";
import {AccessControl} from "AccessControl.sol";

/// @title BandChain StdReferenceBasic
/// @author Band Protocol Team
contract StdReferenceBasic is AccessControl, StdReferenceBase {
    struct RefData {
        uint64 rate; // USD-rate, multiplied by 1e9.
        uint64 resolveTime; // UNIX epoch when data is last resolved.
        uint64 requestID; // BandChain request identifier for this data.
    }

    /// Mapping from token symbol to ref data
    mapping(string => RefData) public refs;

    bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE");

    constructor() {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(RELAYER_ROLE, msg.sender);
    }

    /// @notice Relay and save a set of price data to the contract
    /// @dev All of the lists must be of equal length
    /// @param symbols A list of symbols whose data is being relayed in this function call
    /// @param rates A list of the rates associated with each symbol
    /// @param resolveTime A timestamp of when the rate data was retrieved
    /// @param requestID A BandChain request ID in which the rate data was retrieved
    function relay(
        string[] memory symbols,
        uint64[] memory rates,
        uint64 resolveTime,
        uint64 requestID
    ) external {
        require(hasRole(RELAYER_ROLE, msg.sender), "NOTARELAYER");
        uint256 len = symbols.length;
        require(rates.length == len, "BADRATESLENGTH");
        for (uint256 idx = 0; idx < len; idx++) {
            refs[symbols[idx]] = RefData({rate: rates[idx], resolveTime: resolveTime, requestID: requestID});
        }
    }

    /// @notice Returns the price data for the given base/quote pair. Revert if not available.
    /// @param base the base symbol of the token pair to query
    /// @param quote the quote symbol of the token pair to query
    function getReferenceData(string memory base, string memory quote) public view override returns (ReferenceData memory) {
        (uint256 baseRate, uint256 baseLastUpdate) = _getRefData(base);
        (uint256 quoteRate, uint256 quoteLastUpdate) = _getRefData(quote);
        return ReferenceData({rate: (baseRate * 1e18) / quoteRate, lastUpdatedBase: baseLastUpdate, lastUpdatedQuote: quoteLastUpdate});
    }

    /// @notice Get the price data of a token
    /// @param symbol the symbol of the token whose price to query
    function _getRefData(string memory symbol) internal view returns (uint256 rate, uint256 lastUpdate) {
        if (keccak256(bytes(symbol)) == keccak256(bytes("USD"))) {
            return (1e9, block.timestamp);
        }
        RefData storage refData = refs[symbol];
        require(refData.resolveTime > 0, "REFDATANOTAVAILABLE");
        return (uint256(refData.rate), uint256(refData.resolveTime));
    }
}

File 2 of 8 : StdReferenceBase.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity 0.8.13;

import {IStdReference} from "IStdReference.sol";

abstract contract StdReferenceBase is IStdReference {
    function getReferenceData(string memory _base, string memory _quote) public view virtual override returns (ReferenceData memory);

    function getReferenceDataBulk(string[] memory _bases, string[] memory _quotes) public view override returns (ReferenceData[] memory) {
        require(_bases.length == _quotes.length, "BAD_INPUT_LENGTH");
        uint256 len = _bases.length;
        ReferenceData[] memory results = new ReferenceData[](len);
        for (uint256 idx = 0; idx < len; idx++) {
            results[idx] = getReferenceData(_bases[idx], _quotes[idx]);
        }
        return results;
    }
}

File 3 of 8 : IStdReference.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity 0.8.13;

interface IStdReference {
    /// A structure returned whenever someone requests for standard reference data.
    struct ReferenceData {
        uint256 rate; // base/quote exchange rate, multiplied by 1e18.
        uint256 lastUpdatedBase; // UNIX epoch of the last time when base price gets updated.
        uint256 lastUpdatedQuote; // UNIX epoch of the last time when quote price gets updated.
    }

    /// Returns the price data for the given base/quote pair. Revert if not available.
    function getReferenceData(string memory _base, string memory _quote) external view returns (ReferenceData memory);

    /// Similar to getReferenceData, but with multiple base/quote pairs at once.
    function getReferenceDataBulk(string[] memory _bases, string[] memory _quotes) external view returns (ReferenceData[] memory);
}

File 4 of 8 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "Context.sol";
import "Strings.sol";
import "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 5 of 8 : 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 6 of 8 : 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 7 of 8 : 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 8 of 8 : 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
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "StdReferenceBasic.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELAYER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"base","type":"string"},{"internalType":"string","name":"quote","type":"string"}],"name":"getReferenceData","outputs":[{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedBase","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedQuote","type":"uint256"}],"internalType":"struct IStdReference.ReferenceData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"_bases","type":"string[]"},{"internalType":"string[]","name":"_quotes","type":"string[]"}],"name":"getReferenceDataBulk","outputs":[{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedBase","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedQuote","type":"uint256"}],"internalType":"struct IStdReference.ReferenceData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"refs","outputs":[{"internalType":"uint64","name":"rate","type":"uint64"},{"internalType":"uint64","name":"resolveTime","type":"uint64"},{"internalType":"uint64","name":"requestID","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"symbols","type":"string[]"},{"internalType":"uint64[]","name":"rates","type":"uint64[]"},{"internalType":"uint64","name":"resolveTime","type":"uint64"},{"internalType":"uint64","name":"requestID","type":"uint64"}],"name":"relay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061001c60003361004b565b6100467fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc43361004b565b6100f7565b6100558282610059565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610055576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556100b33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611119806101066000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806391d148541161007157806391d148541461016d578063926d7d7f14610180578063a217fddf146101a7578063ab480741146101af578063d547741f14610223578063e42a071b1461023657600080fd5b806301ffc9a7146100b9578063248a9ca3146100e15780632f2ff15d1461011257806336568abe146101275780633798c7f21461013a57806365555bcc1461014d575b600080fd5b6100cc6100c7366004610adb565b610256565b60405190151581526020015b60405180910390f35b6101046100ef366004610b05565b60009081526020819052604090206001015490565b6040519081526020016100d8565b610125610120366004610b1e565b61028d565b005b610125610135366004610b1e565b6102b8565b610125610148366004610cdd565b61033b565b61016061015b366004610dbf565b6104ec565b6040516100d89190610e22565b6100cc61017b366004610b1e565b610573565b6101047fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc481565b610104600081565b6101f96101bd366004610e43565b80516020818301810180516001825292820191909301209152546001600160401b0380821691600160401b8104821691600160801b9091041683565b604080516001600160401b03948516815292841660208401529216918101919091526060016100d8565b610125610231366004610b1e565b61059c565b610249610244366004610e7f565b6105c2565b6040516100d89190610ed8565b60006001600160e01b03198216637965db0b60e01b148061028757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546102a981336106fc565b6102b38383610760565b505050565b6001600160a01b038116331461032d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61033782826107e4565b5050565b6103657fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc433610573565b61039f5760405162461bcd60e51b815260206004820152600b60248201526a2727aa20a922a620aca2a960a91b6044820152606401610324565b8351835181146103e25760405162461bcd60e51b815260206004820152600e60248201526d0848288a482a88aa6988a9c8ea8960931b6044820152606401610324565b60005b818110156104e457604051806060016040528086838151811061040a5761040a610f3a565b60200260200101516001600160401b03168152602001856001600160401b03168152602001846001600160401b0316815250600187838151811061045057610450610f3a565b60200260200101516040516104659190610f80565b9081526040805160209281900383019020835181549385015194909201516001600160401b039283166fffffffffffffffffffffffffffffffff1990941693909317600160401b948316949094029390931767ffffffffffffffff60801b1916600160801b9190921602179055806104dc81610fb2565b9150506103e5565b505050505050565b61051060405180606001604052806000815260200160008152602001600081525090565b60008061051c85610849565b9150915060008061052c86610849565b9150915060405180606001604052808386670de0b6b3a76400006105509190610fcb565b61055a9190610fea565b8152602081019490945260409093015250949350505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152602081905260409020600101546105b881336106fc565b6102b383836107e4565b606081518351146106085760405162461bcd60e51b815260206004820152601060248201526f0848288be929ca0aaa8be988a9c8ea8960831b6044820152606401610324565b82516000816001600160401b0381111561062457610624610b5a565b60405190808252806020026020018201604052801561067957816020015b61066660405180606001604052806000815260200160008152602001600081525090565b8152602001906001900390816106425790505b50905060005b828110156106f3576106c386828151811061069c5761069c610f3a565b60200260200101518683815181106106b6576106b6610f3a565b60200260200101516104ec565b8282815181106106d5576106d5610f3a565b602002602001018190525080806106eb90610fb2565b91505061067f565b50949350505050565b6107068282610573565b6103375761071e816001600160a01b03166014610939565b610729836020610939565b60405160200161073a92919061100c565b60408051601f198184030181529082905262461bcd60e51b825261032491600401611081565b61076a8282610573565b610337576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556107a03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6107ee8282610573565b15610337576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040805180820190915260038152621554d160ea1b60209182015281519082012060009081907f3b51de553f39ab628e2269fca481f424938614245776e4999eea436892e95d62016108a35750633b9aca00924292509050565b60006001846040516108b59190610f80565b90815260405190819003602001902080549091506001600160401b03600160401b9091041661091c5760405162461bcd60e51b8152602060048201526013602482015272524546444154414e4f54415641494c41424c4560681b6044820152606401610324565b546001600160401b0380821695600160401b909204169350915050565b60606000610948836002610fcb565b6109539060026110b4565b6001600160401b0381111561096a5761096a610b5a565b6040519080825280601f01601f191660200182016040528015610994576020820181803683370190505b509050600360fc1b816000815181106109af576109af610f3a565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106109de576109de610f3a565b60200101906001600160f81b031916908160001a9053506000610a02846002610fcb565b610a0d9060016110b4565b90505b6001811115610a85576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610a4157610a41610f3a565b1a60f81b828281518110610a5757610a57610f3a565b60200101906001600160f81b031916908160001a90535060049490941c93610a7e816110cc565b9050610a10565b508315610ad45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610324565b9392505050565b600060208284031215610aed57600080fd5b81356001600160e01b031981168114610ad457600080fd5b600060208284031215610b1757600080fd5b5035919050565b60008060408385031215610b3157600080fd5b8235915060208301356001600160a01b0381168114610b4f57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715610b9857610b98610b5a565b604052919050565b60006001600160401b03821115610bb957610bb9610b5a565b5060051b60200190565b600082601f830112610bd457600080fd5b81356001600160401b03811115610bed57610bed610b5a565b610c00601f8201601f1916602001610b70565b818152846020838601011115610c1557600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112610c4357600080fd5b81356020610c58610c5383610ba0565b610b70565b82815260059290921b84018101918181019086841115610c7757600080fd5b8286015b84811015610cb65780356001600160401b03811115610c9a5760008081fd5b610ca88986838b0101610bc3565b845250918301918301610c7b565b509695505050505050565b80356001600160401b0381168114610cd857600080fd5b919050565b60008060008060808587031215610cf357600080fd5b84356001600160401b0380821115610d0a57600080fd5b610d1688838901610c32565b9550602091508187013581811115610d2d57600080fd5b87019050601f81018813610d4057600080fd5b8035610d4e610c5382610ba0565b81815260059190911b8201830190838101908a831115610d6d57600080fd5b928401925b82841015610d9257610d8384610cc1565b82529284019290840190610d72565b8097505050505050610da660408601610cc1565b9150610db460608601610cc1565b905092959194509250565b60008060408385031215610dd257600080fd5b82356001600160401b0380821115610de957600080fd5b610df586838701610bc3565b93506020850135915080821115610e0b57600080fd5b50610e1885828601610bc3565b9150509250929050565b81518152602080830151908201526040808301519082015260608101610287565b600060208284031215610e5557600080fd5b81356001600160401b03811115610e6b57600080fd5b610e7784828501610bc3565b949350505050565b60008060408385031215610e9257600080fd5b82356001600160401b0380821115610ea957600080fd5b610eb586838701610c32565b93506020850135915080821115610ecb57600080fd5b50610e1885828601610c32565b6020808252825182820181905260009190848201906040850190845b81811015610f2e57610f1b8385518051825260208082015190830152604090810151910152565b9284019260609290920191600101610ef4565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610f6b578181015183820152602001610f53565b83811115610f7a576000848401525b50505050565b60008251610f92818460208701610f50565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600060018201610fc457610fc4610f9c565b5060010190565b6000816000190483118215151615610fe557610fe5610f9c565b500290565b60008261100757634e487b7160e01b600052601260045260246000fd5b500490565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611044816017850160208801610f50565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611075816028840160208801610f50565b01602801949350505050565b60208152600082518060208401526110a0816040850160208701610f50565b601f01601f19169190910160400192915050565b600082198211156110c7576110c7610f9c565b500190565b6000816110db576110db610f9c565b50600019019056fea2646970667358221220caf53d2dcd212d8ae1a22d1c6d10a507728133117f56e880355fdbc13050b08564736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806391d148541161007157806391d148541461016d578063926d7d7f14610180578063a217fddf146101a7578063ab480741146101af578063d547741f14610223578063e42a071b1461023657600080fd5b806301ffc9a7146100b9578063248a9ca3146100e15780632f2ff15d1461011257806336568abe146101275780633798c7f21461013a57806365555bcc1461014d575b600080fd5b6100cc6100c7366004610adb565b610256565b60405190151581526020015b60405180910390f35b6101046100ef366004610b05565b60009081526020819052604090206001015490565b6040519081526020016100d8565b610125610120366004610b1e565b61028d565b005b610125610135366004610b1e565b6102b8565b610125610148366004610cdd565b61033b565b61016061015b366004610dbf565b6104ec565b6040516100d89190610e22565b6100cc61017b366004610b1e565b610573565b6101047fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc481565b610104600081565b6101f96101bd366004610e43565b80516020818301810180516001825292820191909301209152546001600160401b0380821691600160401b8104821691600160801b9091041683565b604080516001600160401b03948516815292841660208401529216918101919091526060016100d8565b610125610231366004610b1e565b61059c565b610249610244366004610e7f565b6105c2565b6040516100d89190610ed8565b60006001600160e01b03198216637965db0b60e01b148061028757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546102a981336106fc565b6102b38383610760565b505050565b6001600160a01b038116331461032d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61033782826107e4565b5050565b6103657fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc433610573565b61039f5760405162461bcd60e51b815260206004820152600b60248201526a2727aa20a922a620aca2a960a91b6044820152606401610324565b8351835181146103e25760405162461bcd60e51b815260206004820152600e60248201526d0848288a482a88aa6988a9c8ea8960931b6044820152606401610324565b60005b818110156104e457604051806060016040528086838151811061040a5761040a610f3a565b60200260200101516001600160401b03168152602001856001600160401b03168152602001846001600160401b0316815250600187838151811061045057610450610f3a565b60200260200101516040516104659190610f80565b9081526040805160209281900383019020835181549385015194909201516001600160401b039283166fffffffffffffffffffffffffffffffff1990941693909317600160401b948316949094029390931767ffffffffffffffff60801b1916600160801b9190921602179055806104dc81610fb2565b9150506103e5565b505050505050565b61051060405180606001604052806000815260200160008152602001600081525090565b60008061051c85610849565b9150915060008061052c86610849565b9150915060405180606001604052808386670de0b6b3a76400006105509190610fcb565b61055a9190610fea565b8152602081019490945260409093015250949350505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000828152602081905260409020600101546105b881336106fc565b6102b383836107e4565b606081518351146106085760405162461bcd60e51b815260206004820152601060248201526f0848288be929ca0aaa8be988a9c8ea8960831b6044820152606401610324565b82516000816001600160401b0381111561062457610624610b5a565b60405190808252806020026020018201604052801561067957816020015b61066660405180606001604052806000815260200160008152602001600081525090565b8152602001906001900390816106425790505b50905060005b828110156106f3576106c386828151811061069c5761069c610f3a565b60200260200101518683815181106106b6576106b6610f3a565b60200260200101516104ec565b8282815181106106d5576106d5610f3a565b602002602001018190525080806106eb90610fb2565b91505061067f565b50949350505050565b6107068282610573565b6103375761071e816001600160a01b03166014610939565b610729836020610939565b60405160200161073a92919061100c565b60408051601f198184030181529082905262461bcd60e51b825261032491600401611081565b61076a8282610573565b610337576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556107a03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6107ee8282610573565b15610337576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040805180820190915260038152621554d160ea1b60209182015281519082012060009081907f3b51de553f39ab628e2269fca481f424938614245776e4999eea436892e95d62016108a35750633b9aca00924292509050565b60006001846040516108b59190610f80565b90815260405190819003602001902080549091506001600160401b03600160401b9091041661091c5760405162461bcd60e51b8152602060048201526013602482015272524546444154414e4f54415641494c41424c4560681b6044820152606401610324565b546001600160401b0380821695600160401b909204169350915050565b60606000610948836002610fcb565b6109539060026110b4565b6001600160401b0381111561096a5761096a610b5a565b6040519080825280601f01601f191660200182016040528015610994576020820181803683370190505b509050600360fc1b816000815181106109af576109af610f3a565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106109de576109de610f3a565b60200101906001600160f81b031916908160001a9053506000610a02846002610fcb565b610a0d9060016110b4565b90505b6001811115610a85576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610a4157610a41610f3a565b1a60f81b828281518110610a5757610a57610f3a565b60200101906001600160f81b031916908160001a90535060049490941c93610a7e816110cc565b9050610a10565b508315610ad45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610324565b9392505050565b600060208284031215610aed57600080fd5b81356001600160e01b031981168114610ad457600080fd5b600060208284031215610b1757600080fd5b5035919050565b60008060408385031215610b3157600080fd5b8235915060208301356001600160a01b0381168114610b4f57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715610b9857610b98610b5a565b604052919050565b60006001600160401b03821115610bb957610bb9610b5a565b5060051b60200190565b600082601f830112610bd457600080fd5b81356001600160401b03811115610bed57610bed610b5a565b610c00601f8201601f1916602001610b70565b818152846020838601011115610c1557600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112610c4357600080fd5b81356020610c58610c5383610ba0565b610b70565b82815260059290921b84018101918181019086841115610c7757600080fd5b8286015b84811015610cb65780356001600160401b03811115610c9a5760008081fd5b610ca88986838b0101610bc3565b845250918301918301610c7b565b509695505050505050565b80356001600160401b0381168114610cd857600080fd5b919050565b60008060008060808587031215610cf357600080fd5b84356001600160401b0380821115610d0a57600080fd5b610d1688838901610c32565b9550602091508187013581811115610d2d57600080fd5b87019050601f81018813610d4057600080fd5b8035610d4e610c5382610ba0565b81815260059190911b8201830190838101908a831115610d6d57600080fd5b928401925b82841015610d9257610d8384610cc1565b82529284019290840190610d72565b8097505050505050610da660408601610cc1565b9150610db460608601610cc1565b905092959194509250565b60008060408385031215610dd257600080fd5b82356001600160401b0380821115610de957600080fd5b610df586838701610bc3565b93506020850135915080821115610e0b57600080fd5b50610e1885828601610bc3565b9150509250929050565b81518152602080830151908201526040808301519082015260608101610287565b600060208284031215610e5557600080fd5b81356001600160401b03811115610e6b57600080fd5b610e7784828501610bc3565b949350505050565b60008060408385031215610e9257600080fd5b82356001600160401b0380821115610ea957600080fd5b610eb586838701610c32565b93506020850135915080821115610ecb57600080fd5b50610e1885828601610c32565b6020808252825182820181905260009190848201906040850190845b81811015610f2e57610f1b8385518051825260208082015190830152604090810151910152565b9284019260609290920191600101610ef4565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610f6b578181015183820152602001610f53565b83811115610f7a576000848401525b50505050565b60008251610f92818460208701610f50565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600060018201610fc457610fc4610f9c565b5060010190565b6000816000190483118215151615610fe557610fe5610f9c565b500290565b60008261100757634e487b7160e01b600052601260045260246000fd5b500490565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611044816017850160208801610f50565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611075816028840160208801610f50565b01602801949350505050565b60208152600082518060208401526110a0816040850160208701610f50565b601f01601f19169190910160400192915050565b600082198211156110c7576110c7610f9c565b500190565b6000816110db576110db610f9c565b50600019019056fea2646970667358221220caf53d2dcd212d8ae1a22d1c6d10a507728133117f56e880355fdbc13050b08564736f6c634300080d0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.