ETH Price: $2,657.57 (+5.71%)
 

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
_transfer Owners...176656292023-07-10 20:27:23681 days ago1689020843IN
0xaFf0bb2f...Ca12A7EFe
0 ETH0.0009527233.25630604
Set Feed163994282023-01-13 17:41:11860 days ago1673631671IN
0xaFf0bb2f...Ca12A7EFe
0 ETH0.0031581636.04962631
Set Feed163494572023-01-06 18:13:35867 days ago1673028815IN
0xaFf0bb2f...Ca12A7EFe
0 ETH0.0043206950.25642138
_transfer Owners...162286672022-12-20 21:43:11883 days ago1671572591IN
0xaFf0bb2f...Ca12A7EFe
0 ETH0.0004374315.26939113

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChainlinkOperator

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "@prb/contracts/access/Ownable.sol";
import "@prb/contracts/token/erc20/IErc20.sol";

import "./IChainlinkOperator.sol";

/// @title ChainlinkOperator
/// @author Hifi
contract ChainlinkOperator is
    IChainlinkOperator, // no dependency
    Ownable // one dependency
{
    /// PUBLIC STORAGE ///

    /// @dev Mapping between Erc20 symbols and Feed structs.
    mapping(string => Feed) internal feeds;

    /// @inheritdoc IChainlinkOperator
    uint256 public constant override pricePrecision = 8;

    /// @inheritdoc IChainlinkOperator
    uint256 public constant override pricePrecisionScalar = 1.0e10;

    /// @inheritdoc IChainlinkOperator
    uint256 public override priceStalenessThreshold;

    constructor() Ownable() {
        priceStalenessThreshold = 1 days;
    }

    /// CONSTANT FUNCTIONS ///

    /// @inheritdoc IChainlinkOperator
    function getFeed(string memory symbol)
        external
        view
        override
        returns (
            IErc20,
            IAggregatorV3,
            bool
        )
    {
        return (feeds[symbol].asset, feeds[symbol].id, feeds[symbol].isSet);
    }

    /// @inheritdoc IChainlinkOperator
    function getNormalizedPrice(string memory symbol) external view override returns (uint256) {
        uint256 price = getPrice(symbol);
        uint256 normalizedPrice = price * pricePrecisionScalar;
        return normalizedPrice;
    }

    /// @inheritdoc IChainlinkOperator
    function getPrice(string memory symbol) public view override returns (uint256) {
        if (!feeds[symbol].isSet) {
            revert ChainlinkOperator__FeedNotSet(symbol);
        }
        (, int256 intPrice, , uint256 latestUpdateTimestamp, ) = IAggregatorV3(feeds[symbol].id).latestRoundData();
        if (block.timestamp - latestUpdateTimestamp > priceStalenessThreshold) {
            revert ChainlinkOperator__PriceStale(symbol);
        }
        if (intPrice <= 0) {
            revert ChainlinkOperator__PriceLessThanOrEqualToZero(symbol);
        }
        uint256 price = uint256(intPrice);
        return price;
    }

    /// PUBLIC NON-CONSTANT FUNCTIONS ///

    /// @inheritdoc IChainlinkOperator
    function deleteFeed(string memory symbol) external override onlyOwner {
        // Checks
        if (!feeds[symbol].isSet) {
            revert ChainlinkOperator__FeedNotSet(symbol);
        }

        // Effects: delete the feed from storage.
        IAggregatorV3 feed = feeds[symbol].id;
        IErc20 asset = feeds[symbol].asset;
        delete feeds[symbol];

        emit DeleteFeed(asset, feed);
    }

    /// @inheritdoc IChainlinkOperator
    function setFeed(IErc20 asset, IAggregatorV3 feed) external override onlyOwner {
        string memory symbol = asset.symbol();

        // Checks: price precision.
        uint8 decimals = feed.decimals();
        if (decimals != pricePrecision) {
            revert ChainlinkOperator__DecimalsMismatch(symbol, decimals);
        }

        // Effects: put the feed into storage.
        feeds[symbol] = Feed({ asset: asset, id: feed, isSet: true });

        emit SetFeed(asset, feed);
    }

    /// @inheritdoc IChainlinkOperator
    function setPriceStalenessThreshold(uint256 newPriceStalenessThreshold) external override onlyOwner {
        // Effects: update storage.
        uint256 oldPriceStalenessThreshold = priceStalenessThreshold;
        priceStalenessThreshold = newPriceStalenessThreshold;

        emit SetPriceStalenessThreshold(oldPriceStalenessThreshold, newPriceStalenessThreshold);
    }
}

// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;

import "./IOwnable.sol";

/// @notice Emitted when the caller is not the owner.
error Ownable__NotOwner(address owner, address caller);

/// @notice Emitted when setting the owner to the zero address.
error Ownable__OwnerZeroAddress();

/// @title Ownable
/// @author Paul Razvan Berg
contract Ownable is IOwnable {
    /// PUBLIC STORAGE ///

    /// @inheritdoc IOwnable
    address public override owner;

    /// MODIFIERS ///

    /// @notice Throws if called by any account other than the owner.
    modifier onlyOwner() {
        if (owner != msg.sender) {
            revert Ownable__NotOwner(owner, msg.sender);
        }
        _;
    }

    /// CONSTRUCTOR ///

    /// @notice Initializes the contract setting the deployer as the initial owner.
    constructor() {
        address msgSender = msg.sender;
        owner = msgSender;
        emit TransferOwnership(address(0), msgSender);
    }

    /// PUBLIC NON-CONSTANT FUNCTIONS ///

    /// @inheritdoc IOwnable
    function _renounceOwnership() public virtual override onlyOwner {
        emit TransferOwnership(owner, address(0));
        owner = address(0);
    }

    /// @inheritdoc IOwnable
    function _transferOwnership(address newOwner) public virtual override onlyOwner {
        if (newOwner == address(0)) {
            revert Ownable__OwnerZeroAddress();
        }
        emit TransferOwnership(owner, newOwner);
        owner = newOwner;
    }
}

// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;

/// @title IErc20
/// @author Paul Razvan Berg
/// @notice Implementation for the Erc20 standard.
///
/// We have followed general OpenZeppelin guidelines: functions revert instead of returning
/// `false` on failure. This behavior is nonetheless conventional and does not conflict with
/// the with the expectations of Erc20 applications.
///
/// Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows
/// applications to reconstruct the allowance for all accounts just by listening to said
/// events. Other implementations of the Erc may not emit these events, as it isn't
/// required by the specification.
///
/// Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been
/// added to mitigate the well-known issues around setting allowances.
///
/// @dev Forked from OpenZeppelin
/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC20/ERC20.sol
interface IErc20 {
    /// EVENTS ///

    /// @notice Emitted when an approval happens.
    /// @param owner The address of the owner of the tokens.
    /// @param spender The address of the spender.
    /// @param amount The maximum amount that can be spent.
    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /// @notice Emitted when a transfer happens.
    /// @param from The account sending the tokens.
    /// @param to The account receiving the tokens.
    /// @param amount The amount of tokens transferred.
    event Transfer(address indexed from, address indexed to, uint256 amount);

    /// CONSTANT FUNCTIONS ///

    /// @notice Returns the remaining number of tokens that `spender` will be allowed to spend
    /// on behalf of `owner` through {transferFrom}. This is zero by default.
    ///
    /// @dev This value changes when {approve} or {transferFrom} are called.
    function allowance(address owner, address spender) external view returns (uint256);

    /// @notice Returns the amount of tokens owned by `account`.
    function balanceOf(address account) external view returns (uint256);

    /// @notice Returns the number of decimals used to get its user representation.
    function decimals() external view returns (uint8);

    /// @notice Returns the name of the token.
    function name() external view returns (string memory);

    /// @notice Returns the symbol of the token, usually a shorter version of the name.
    function symbol() external view returns (string memory);

    /// @notice Returns the amount of tokens in existence.
    function totalSupply() external view returns (uint256);

    /// NON-CONSTANT FUNCTIONS ///

    /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.
    ///
    /// @dev Emits an {Approval} event.
    ///
    /// IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may
    /// use both the old and the new allowance by unfortunate transaction ordering. One possible solution
    /// to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired
    /// value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    ///
    /// Requirements:
    ///
    /// - `spender` cannot be the zero address.
    ///
    /// @return a boolean value indicating whether the operation succeeded.
    function approve(address spender, uint256 amount) external returns (bool);

    /// @notice Atomically decreases the allowance granted to `spender` by the caller.
    ///
    /// @dev Emits an {Approval} event indicating the updated allowance.
    ///
    /// This is an alternative to {approve} that can be used as a mitigation for problems described
    /// in {Erc20Interface-approve}.
    ///
    /// Requirements:
    ///
    /// - `spender` cannot be the zero address.
    /// - `spender` must have allowance for the caller of at least `subtractedAmount`.
    function decreaseAllowance(address spender, uint256 subtractedAmount) external returns (bool);

    /// @notice Atomically increases the allowance granted to `spender` by the caller.
    ///
    /// @dev Emits an {Approval} event indicating the updated allowance.
    ///
    /// This is an alternative to {approve} that can be used as a mitigation for the problems described above.
    ///
    /// Requirements:
    ///
    /// - `spender` cannot be the zero address.
    function increaseAllowance(address spender, uint256 addedAmount) external returns (bool);

    /// @notice Moves `amount` tokens from the caller's account to `recipient`.
    ///
    /// @dev Emits a {Transfer} event.
    ///
    /// Requirements:
    ///
    /// - `recipient` cannot be the zero address.
    /// - The caller must have a balance of at least `amount`.
    ///
    /// @return a boolean value indicating whether the operation succeeded.
    function transfer(address recipient, uint256 amount) external returns (bool);

    /// @notice Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount`
    /// `is then deducted from the caller's allowance.
    ///
    /// @dev Emits a {Transfer} event and an {Approval} event indicating the updated allowance. This is
    /// not required by the Erc. See the note at the beginning of {Erc20}.
    ///
    /// Requirements:
    ///
    /// - `sender` and `recipient` cannot be the zero address.
    /// - `sender` must have a balance of at least `amount`.
    /// - The caller must have approed `sender` to spent at least `amount` tokens.
    ///
    /// @return a boolean value indicating whether the operation succeeded.
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.4;

import "@prb/contracts/token/erc20/IErc20.sol";
import "@prb/contracts/access/IOwnable.sol";

import "../external/chainlink/IAggregatorV3.sol";

/// @title IChainlinkOperator
/// @author Hifi
/// @notice Aggregates the price feeds provided by Chainlink.
interface IChainlinkOperator {
    /// CUSTOM ERRORS ///

    /// @notice Emitted when the decimal precision of the feed is not the same as the expected number.
    error ChainlinkOperator__DecimalsMismatch(string symbol, uint256 decimals);

    /// @notice Emitted when trying to interact with a feed not set yet.
    error ChainlinkOperator__FeedNotSet(string symbol);

    /// @notice Emitted when the price returned by the oracle is less than or equal to zero.
    error ChainlinkOperator__PriceLessThanOrEqualToZero(string symbol);

    /// @notice Emitted when the latest price update timestamp returned by the oracle is too old.
    error ChainlinkOperator__PriceStale(string symbol);

    /// EVENTS ///

    /// @notice Emitted when a feed is deleted.
    /// @param asset The related asset.
    /// @param feed The related feed.
    event DeleteFeed(IErc20 indexed asset, IAggregatorV3 indexed feed);

    /// @notice Emitted when a feed is set.
    /// @param asset The related asset.
    /// @param feed The related feed.
    event SetFeed(IErc20 indexed asset, IAggregatorV3 indexed feed);

    /// @notice Emitted when the Chainlink price staleness threshold is set.
    /// @param oldPriceStalenessThreshold The old Chainlink price staleness threshold.
    /// @param newPriceStalenessThreshold The new Chainlink price staleness threshold.
    event SetPriceStalenessThreshold(uint256 oldPriceStalenessThreshold, uint256 newPriceStalenessThreshold);

    /// STRUCTS ///

    struct Feed {
        IErc20 asset;
        IAggregatorV3 id;
        bool isSet;
    }

    /// CONSTANT FUNCTIONS ///

    /// @notice Gets the official feed for a symbol.
    /// @param symbol The symbol to return the feed for.
    /// @return (address asset, address id, bool isSet).
    function getFeed(string memory symbol)
        external
        view
        returns (
            IErc20,
            IAggregatorV3,
            bool
        );

    /// @notice Gets the official price for a symbol and adjusts it have 18 decimals instead of the
    /// format used by Chainlink, which has 8 decimals.
    ///
    /// @dev Requirements:
    /// - The normalized price cannot overflow.
    ///
    /// @param symbol The Erc20 symbol of the token for which to query the price.
    /// @return The normalized price.
    function getNormalizedPrice(string memory symbol) external view returns (uint256);

    /// @notice Gets the official price for a symbol in the default format used by Chainlink, which
    /// has 8 decimals.
    ///
    /// @dev Requirements:
    ///
    /// - The feed must be set.
    /// - The price returned by the oracle cannot be zero.
    ///
    /// @param symbol The symbol to fetch the price for.
    /// @return The price denominated in USD, with 8 decimals.
    function getPrice(string memory symbol) external view returns (uint256);

    /// @notice Chainlink price precision for USD-quoted data.
    function pricePrecision() external view returns (uint256);

    /// @notice The ratio between normalized precision (1e18) and the Chainlink price precision (1e8).
    function pricePrecisionScalar() external view returns (uint256);

    /// @notice The Chainlink price staleness threshold.
    function priceStalenessThreshold() external view returns (uint256);

    /// NON-CONSTANT FUNCTIONS ///

    /// @notice Deletes a previously set Chainlink price feed.
    ///
    /// @dev Emits a {DeleteFeed} event.
    ///
    /// Requirements:
    ///
    /// - The caller must be the owner.
    /// - The feed must be set already.
    ///
    /// @param symbol The Erc20 symbol of the asset to delete the feed for.
    function deleteFeed(string memory symbol) external;

    /// @notice Sets a Chainlink price feed.
    ///
    /// @dev It is not an error to set a feed twice. Emits a {SetFeed} event.
    ///
    /// Requirements:
    ///
    /// - The caller must be the owner.
    /// - The number of decimals of the feed must be 8.
    ///
    /// @param asset The address of the Erc20 contract for which to get the price.
    /// @param feed The address of the Chainlink price feed contract.
    function setFeed(IErc20 asset, IAggregatorV3 feed) external;

    /// @notice Sets the Chainlink price staleness threshold.
    ///
    /// @dev Emits a {SetPriceStalenessThreshold} event.
    ///
    /// Requirements:
    ///
    /// - The caller must be the owner.
    ///
    /// @param newPriceStalenessThreshold The new Chainlink price staleness threshold.
    function setPriceStalenessThreshold(uint256 newPriceStalenessThreshold) external;
}

// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.4;

/// @title IOwnable
/// @author Paul Razvan Berg
/// @notice Contract module that provides a basic access control mechanism, where there is an
/// account (an owner) that can be granted exclusive access to specific functions.
///
/// By default, the owner account will be the one that deploys the contract. This can later be
/// changed with {transfer}.
///
/// This module is used through inheritance. It will make available the modifier `onlyOwner`,
/// which can be applied to your functions to restrict their use to the owner.
///
/// @dev Forked from OpenZeppelin
/// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/access/Ownable.sol
interface IOwnable {
    /// EVENTS ///

    /// @notice Emitted when ownership is transferred.
    /// @param oldOwner The address of the old owner.
    /// @param newOwner The address of the new owner.
    event TransferOwnership(address indexed oldOwner, address indexed newOwner);

    /// NON-CONSTANT FUNCTIONS ///

    /// @notice Leaves the contract without owner, so it will not be possible to call `onlyOwner`
    /// functions anymore.
    ///
    /// WARNING: Doing this will leave the contract without an owner, thereby removing any
    /// functionality that is only available to the owner.
    ///
    /// Requirements:
    ///
    /// - The caller must be the owner.
    function _renounceOwnership() external;

    /// @notice Transfers the owner of the contract to a new account (`newOwner`). Can only be
    /// called by the current owner.
    /// @param newOwner The account of the new owner.
    function _transferOwnership(address newOwner) external;

    /// CONSTANT FUNCTIONS ///

    /// @notice The address of the owner account or contract.
    /// @return The address of the owner.
    function owner() external view returns (address);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

/// @title IAggregatorV3
/// @author Hifi
/// @dev Forked from Chainlink
/// github.com/smartcontractkit/chainlink/blob/v1.2.0/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol
interface IAggregatorV3 {
    function decimals() external view returns (uint8);

    function description() external view returns (string memory);

    function version() external view returns (uint256);

    /// getRoundData and latestRoundData should both raise "No data present" if they do not have
    /// data to report, instead of returning unset values which could be misinterpreted as
    /// actual reported values.
    function getRoundData(uint80 _roundId)
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );

    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );
}

Settings
{
  "metadata": {
    "bytecodeHash": "none"
  },
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"ChainlinkOperator__DecimalsMismatch","type":"error"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"ChainlinkOperator__FeedNotSet","type":"error"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"ChainlinkOperator__PriceLessThanOrEqualToZero","type":"error"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"ChainlinkOperator__PriceStale","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"Ownable__NotOwner","type":"error"},{"inputs":[],"name":"Ownable__OwnerZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IErc20","name":"asset","type":"address"},{"indexed":true,"internalType":"contract IAggregatorV3","name":"feed","type":"address"}],"name":"DeleteFeed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IErc20","name":"asset","type":"address"},{"indexed":true,"internalType":"contract IAggregatorV3","name":"feed","type":"address"}],"name":"SetFeed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPriceStalenessThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPriceStalenessThreshold","type":"uint256"}],"name":"SetPriceStalenessThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"TransferOwnership","type":"event"},{"inputs":[],"name":"_renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"_transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"deleteFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"getFeed","outputs":[{"internalType":"contract IErc20","name":"","type":"address"},{"internalType":"contract IAggregatorV3","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"getNormalizedPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePrecision","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePrecisionScalar","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceStalenessThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IErc20","name":"asset","type":"address"},{"internalType":"contract IAggregatorV3","name":"feed","type":"address"}],"name":"setFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPriceStalenessThreshold","type":"uint256"}],"name":"setPriceStalenessThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b031916339081178255604051909182917f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c908290a35062015180600255610ccb806100686000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80638da5cb5b11610081578063d29d44ee1161005b578063d29d44ee146101b9578063dbb67480146101cc578063ed917cee146101d857600080fd5b80638da5cb5b1461017d578063ad5c6ec5146101a8578063bd111870146101b057600080fd5b80634b3f2889116100b25780634b3f288914610141578063524f38891461014957806386ac03e01461016a57600080fd5b80633b39a51c146100d957806340b1eb10146101195780634915a8581461012e575b600080fd5b6100ec6100e73660046109ab565b6101eb565b604080516001600160a01b0394851681529390921660208401521515908201526060015b60405180910390f35b61012c610127366004610a43565b61027e565b005b61012c61013c366004610a7c565b61049a565b61012c61051f565b61015c6101573660046109ab565b6105a9565b604051908152602001610110565b61012c6101783660046109ab565b6106e6565b600054610190906001600160a01b031681565b6040516001600160a01b039091168152602001610110565b61015c600881565b61015c60025481565b61012c6101c7366004610a95565b610853565b61015c6402540be40081565b61015c6101e63660046109ab565b610915565b60008060006001846040516102009190610ae9565b908152604051908190036020018120546001600160a01b031690600190610228908790610ae9565b9081526040519081900360200181206001908101546001600160a01b031691610252908890610ae9565b90815260405190819003602001902060010154919450925060ff600160a01b9091041690509193909250565b6000546001600160a01b031633146102c35760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044015b60405180910390fd5b6000826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610303573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261032b9190810190610b05565b90506000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b7c565b905060088160ff16146103bb57818160405163d0dc36dd60e01b81526004016102ba929190610bcb565b6040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001600115158152506001836040516103fb9190610ae9565b908152604080519182900360209081018320845181546001600160a01b039182166001600160a01b0319909116178255918501516001909101805495909301511515600160a01b0274ffffffffffffffffffffffffffffffffffffffffff1990951690821617939093179055848216918616907f647a720046a42b3b8e46b4e518d1e66a98da8898542a3ac043f788fa6209e86290600090a350505050565b6000546001600160a01b031633146104da5760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b600280549082905560408051828152602081018490527f3199897917aa360ae778e0f59c5e269aeb391a5f9d69fbf231af6cd452615572910160405180910390a15050565b6000546001600160a01b0316331461055f5760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b600080546040516001600160a01b03909116907f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c908390a3600080546001600160a01b0319169055565b60006001826040516105bb9190610ae9565b9081526040519081900360200190206001015460ff600160a01b909104166105f8578160405163a915259360e01b81526004016102ba9190610bf0565b60008060018460405161060b9190610ae9565b9081526040805191829003602001822060010154633fabe5a360e21b835290516001600160a01b039091169163feaf968c9160048083019260a09291908290030181865afa158015610661573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106859190610c22565b50935050925050600254814261069b9190610c88565b11156106bc5783604051636f14417760e01b81526004016102ba9190610bf0565b600082136106df5783604051634c3e04fb60e11b81526004016102ba9190610bf0565b5092915050565b6000546001600160a01b031633146107265760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b6001816040516107369190610ae9565b9081526040519081900360200190206001015460ff600160a01b90910416610773578060405163a915259360e01b81526004016102ba9190610bf0565b60006001826040516107859190610ae9565b9081526040519081900360200181206001908101546001600160a01b031692506000916107b3908590610ae9565b908152604051908190036020018120546001600160a01b031691506001906107dc908590610ae9565b90815260405190819003602001812080546001600160a01b0319168155600101805474ffffffffffffffffffffffffffffffffffffffffff191690556001600160a01b0383811691908316907f321e6a7a83f180e8fbc42d0c925ac22ca151900bdb6bb6b67b678e9dcca6e1d690600090a3505050565b6000546001600160a01b031633146108935760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b6001600160a01b0381166108ba57604051634208fc5d60e01b815260040160405180910390fd5b600080546040516001600160a01b03808516939216917f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080610921836105a9565b905060006109346402540be40083610c9f565b949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561097b5761097b61093c565b604052919050565b600067ffffffffffffffff82111561099d5761099d61093c565b50601f01601f191660200190565b6000602082840312156109bd57600080fd5b813567ffffffffffffffff8111156109d457600080fd5b8201601f810184136109e557600080fd5b80356109f86109f382610983565b610952565b818152856020838501011115610a0d57600080fd5b81602084016020830137600091810160200191909152949350505050565b6001600160a01b0381168114610a4057600080fd5b50565b60008060408385031215610a5657600080fd5b8235610a6181610a2b565b91506020830135610a7181610a2b565b809150509250929050565b600060208284031215610a8e57600080fd5b5035919050565b600060208284031215610aa757600080fd5b8135610ab281610a2b565b9392505050565b60005b83811015610ad4578181015183820152602001610abc565b83811115610ae3576000848401525b50505050565b60008251610afb818460208701610ab9565b9190910192915050565b600060208284031215610b1757600080fd5b815167ffffffffffffffff811115610b2e57600080fd5b8201601f81018413610b3f57600080fd5b8051610b4d6109f382610983565b818152856020838501011115610b6257600080fd5b610b73826020830160208601610ab9565b95945050505050565b600060208284031215610b8e57600080fd5b815160ff81168114610ab257600080fd5b60008151808452610bb7816020860160208601610ab9565b601f01601f19169290920160200192915050565b604081526000610bde6040830185610b9f565b905060ff831660208301529392505050565b602081526000610ab26020830184610b9f565b805169ffffffffffffffffffff81168114610c1d57600080fd5b919050565b600080600080600060a08688031215610c3a57600080fd5b610c4386610c03565b9450602086015193506040860151925060608601519150610c6660808701610c03565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600082821015610c9a57610c9a610c72565b500390565b6000816000190483118215151615610cb957610cb9610c72565b50029056fea164736f6c634300080c000a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80638da5cb5b11610081578063d29d44ee1161005b578063d29d44ee146101b9578063dbb67480146101cc578063ed917cee146101d857600080fd5b80638da5cb5b1461017d578063ad5c6ec5146101a8578063bd111870146101b057600080fd5b80634b3f2889116100b25780634b3f288914610141578063524f38891461014957806386ac03e01461016a57600080fd5b80633b39a51c146100d957806340b1eb10146101195780634915a8581461012e575b600080fd5b6100ec6100e73660046109ab565b6101eb565b604080516001600160a01b0394851681529390921660208401521515908201526060015b60405180910390f35b61012c610127366004610a43565b61027e565b005b61012c61013c366004610a7c565b61049a565b61012c61051f565b61015c6101573660046109ab565b6105a9565b604051908152602001610110565b61012c6101783660046109ab565b6106e6565b600054610190906001600160a01b031681565b6040516001600160a01b039091168152602001610110565b61015c600881565b61015c60025481565b61012c6101c7366004610a95565b610853565b61015c6402540be40081565b61015c6101e63660046109ab565b610915565b60008060006001846040516102009190610ae9565b908152604051908190036020018120546001600160a01b031690600190610228908790610ae9565b9081526040519081900360200181206001908101546001600160a01b031691610252908890610ae9565b90815260405190819003602001902060010154919450925060ff600160a01b9091041690509193909250565b6000546001600160a01b031633146102c35760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044015b60405180910390fd5b6000826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610303573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261032b9190810190610b05565b90506000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b7c565b905060088160ff16146103bb57818160405163d0dc36dd60e01b81526004016102ba929190610bcb565b6040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001600115158152506001836040516103fb9190610ae9565b908152604080519182900360209081018320845181546001600160a01b039182166001600160a01b0319909116178255918501516001909101805495909301511515600160a01b0274ffffffffffffffffffffffffffffffffffffffffff1990951690821617939093179055848216918616907f647a720046a42b3b8e46b4e518d1e66a98da8898542a3ac043f788fa6209e86290600090a350505050565b6000546001600160a01b031633146104da5760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b600280549082905560408051828152602081018490527f3199897917aa360ae778e0f59c5e269aeb391a5f9d69fbf231af6cd452615572910160405180910390a15050565b6000546001600160a01b0316331461055f5760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b600080546040516001600160a01b03909116907f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c908390a3600080546001600160a01b0319169055565b60006001826040516105bb9190610ae9565b9081526040519081900360200190206001015460ff600160a01b909104166105f8578160405163a915259360e01b81526004016102ba9190610bf0565b60008060018460405161060b9190610ae9565b9081526040805191829003602001822060010154633fabe5a360e21b835290516001600160a01b039091169163feaf968c9160048083019260a09291908290030181865afa158015610661573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106859190610c22565b50935050925050600254814261069b9190610c88565b11156106bc5783604051636f14417760e01b81526004016102ba9190610bf0565b600082136106df5783604051634c3e04fb60e11b81526004016102ba9190610bf0565b5092915050565b6000546001600160a01b031633146107265760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b6001816040516107369190610ae9565b9081526040519081900360200190206001015460ff600160a01b90910416610773578060405163a915259360e01b81526004016102ba9190610bf0565b60006001826040516107859190610ae9565b9081526040519081900360200181206001908101546001600160a01b031692506000916107b3908590610ae9565b908152604051908190036020018120546001600160a01b031691506001906107dc908590610ae9565b90815260405190819003602001812080546001600160a01b0319168155600101805474ffffffffffffffffffffffffffffffffffffffffff191690556001600160a01b0383811691908316907f321e6a7a83f180e8fbc42d0c925ac22ca151900bdb6bb6b67b678e9dcca6e1d690600090a3505050565b6000546001600160a01b031633146108935760005460405163cc6bdb1d60e01b81526001600160a01b0390911660048201523360248201526044016102ba565b6001600160a01b0381166108ba57604051634208fc5d60e01b815260040160405180910390fd5b600080546040516001600160a01b03808516939216917f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080610921836105a9565b905060006109346402540be40083610c9f565b949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561097b5761097b61093c565b604052919050565b600067ffffffffffffffff82111561099d5761099d61093c565b50601f01601f191660200190565b6000602082840312156109bd57600080fd5b813567ffffffffffffffff8111156109d457600080fd5b8201601f810184136109e557600080fd5b80356109f86109f382610983565b610952565b818152856020838501011115610a0d57600080fd5b81602084016020830137600091810160200191909152949350505050565b6001600160a01b0381168114610a4057600080fd5b50565b60008060408385031215610a5657600080fd5b8235610a6181610a2b565b91506020830135610a7181610a2b565b809150509250929050565b600060208284031215610a8e57600080fd5b5035919050565b600060208284031215610aa757600080fd5b8135610ab281610a2b565b9392505050565b60005b83811015610ad4578181015183820152602001610abc565b83811115610ae3576000848401525b50505050565b60008251610afb818460208701610ab9565b9190910192915050565b600060208284031215610b1757600080fd5b815167ffffffffffffffff811115610b2e57600080fd5b8201601f81018413610b3f57600080fd5b8051610b4d6109f382610983565b818152856020838501011115610b6257600080fd5b610b73826020830160208601610ab9565b95945050505050565b600060208284031215610b8e57600080fd5b815160ff81168114610ab257600080fd5b60008151808452610bb7816020860160208601610ab9565b601f01601f19169290920160200192915050565b604081526000610bde6040830185610b9f565b905060ff831660208301529392505050565b602081526000610ab26020830184610b9f565b805169ffffffffffffffffffff81168114610c1d57600080fd5b919050565b600080600080600060a08688031215610c3a57600080fd5b610c4386610c03565b9450602086015193506040860151925060608601519150610c6660808701610c03565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600082821015610c9a57610c9a610c72565b500390565b6000816000190483118215151615610cb957610cb9610c72565b50029056fea164736f6c634300080c000a

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.