ETH Price: $2,582.36 (-4.21%)

Contract

0x865934bEa4Ffe1B51260a99455B1561BC3114E07
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...190797262024-01-24 23:18:59215 days ago1706138339IN
0x865934bE...BC3114E07
0 ETH0.0003727713
Set Custom Oracl...190795482024-01-24 22:43:23215 days ago1706136203IN
0x865934bE...BC3114E07
0 ETH0.0005762412
Initialize190795202024-01-24 22:37:47215 days ago1706135867IN
0x865934bE...BC3114E07
0 ETH0.0008261212
0x60806040190795182024-01-24 22:37:23215 days ago1706135843IN
 Create: GenericOracle
0 ETH0.0084425712

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GenericOracle

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion, GNU GPLv3 license
File 1 of 8 : GenericOracle.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.17;

import "Ownable.sol";
import "IERC20Metadata.sol";

import "ScaledMath.sol";
import "IGenericOracle.sol";

contract GenericOracle is IGenericOracle, Ownable {
    using ScaledMath for uint256;

    event CustomOracleAdded(address token, address oracle);

    mapping(address => IOracle) public customOracles;

    IOracle internal _chainlinkOracle;
    IOracle internal _curveLpOracle;

    function initialize(address curveLpOracle, address chainlinkOracle) external onlyOwner {
        require(address(_curveLpOracle) == address(0), "already initialized");
        _chainlinkOracle = IOracle(chainlinkOracle);
        _curveLpOracle = IOracle(curveLpOracle);
    }

    function isTokenSupported(address token) external view override returns (bool) {
        return
            address(customOracles[token]) != address(0) ||
            _chainlinkOracle.isTokenSupported(token) ||
            _curveLpOracle.isTokenSupported(token);
    }

    function getOracle(address token) public view virtual returns (IOracle) {
        if (address(customOracles[token]) != address(0)) {
            return customOracles[token];
        }
        if (_chainlinkOracle.isTokenSupported(token)) {
            return _chainlinkOracle;
        }
        return _curveLpOracle;
    }

    function getUSDPrice(address token) public view virtual returns (uint256) {
        return getOracle(token).getUSDPrice(token);
    }

    function setCustomOracle(address token, address oracle) external onlyOwner {
        customOracles[token] = IOracle(oracle);
        emit CustomOracleAdded(token, oracle);
    }

    function curveLpToUnderlying(
        address curveLpToken,
        address underlying,
        uint256 curveLpAmount
    ) external view returns (uint256) {
        return
            curveLpToUnderlying(curveLpToken, underlying, curveLpAmount, getUSDPrice(underlying));
    }

    function curveLpToUnderlying(
        address curveLpToken,
        address underlying,
        uint256 curveLpAmount,
        uint256 underlyingPrice
    ) public view returns (uint256) {
        return
            curveLpAmount.mulDown(getUSDPrice(curveLpToken)).divDown(underlyingPrice).convertScale(
                18,
                IERC20Metadata(underlying).decimals()
            );
    }

    function underlyingToCurveLp(
        address underlying,
        address curveLpToken,
        uint256 underlyingAmount
    ) external view returns (uint256) {
        return
            underlyingAmount
                .mulDown(getUSDPrice(address(underlying)))
                .divDown(getUSDPrice(curveLpToken))
                .convertScale(IERC20Metadata(underlying).decimals(), 18);
    }
}

File 2 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}

File 4 of 8 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 5 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

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

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * 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
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 6 of 8 : ScaledMath.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.17;

library ScaledMath {
    uint256 internal constant DECIMALS = 18;
    uint256 internal constant ONE = 10 ** DECIMALS;

    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {
        return (a * b) / ONE;
    }

    function mulDown(uint256 a, uint256 b, uint256 decimals) internal pure returns (uint256) {
        return (a * b) / (10 ** decimals);
    }

    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {
        return (a * ONE) / b;
    }

    function divDown(uint256 a, uint256 b, uint256 decimals) internal pure returns (uint256) {
        return (a * 10 ** decimals) / b;
    }

    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        return ((a * ONE) - 1) / b + 1;
    }

    function mulDown(int256 a, int256 b) internal pure returns (int256) {
        return (a * b) / int256(ONE);
    }

    function mulDownUint128(uint128 a, uint128 b) internal pure returns (uint128) {
        return (a * b) / uint128(ONE);
    }

    function mulDown(int256 a, int256 b, uint256 decimals) internal pure returns (int256) {
        return (a * b) / int256(10 ** decimals);
    }

    function divDown(int256 a, int256 b) internal pure returns (int256) {
        return (a * int256(ONE)) / b;
    }

    function divDownUint128(uint128 a, uint128 b) internal pure returns (uint128) {
        return (a * uint128(ONE)) / b;
    }

    function divDown(int256 a, int256 b, uint256 decimals) internal pure returns (int256) {
        return (a * int256(10 ** decimals)) / b;
    }

    function convertScale(
        uint256 a,
        uint8 fromDecimals,
        uint8 toDecimals
    ) internal pure returns (uint256) {
        if (fromDecimals == toDecimals) return a;
        if (fromDecimals > toDecimals) return downscale(a, fromDecimals, toDecimals);
        return upscale(a, fromDecimals, toDecimals);
    }

    function convertScale(
        int256 a,
        uint8 fromDecimals,
        uint8 toDecimals
    ) internal pure returns (int256) {
        if (fromDecimals == toDecimals) return a;
        if (fromDecimals > toDecimals) return downscale(a, fromDecimals, toDecimals);
        return upscale(a, fromDecimals, toDecimals);
    }

    function upscale(
        uint256 a,
        uint8 fromDecimals,
        uint8 toDecimals
    ) internal pure returns (uint256) {
        return a * (10 ** (toDecimals - fromDecimals));
    }

    function downscale(
        uint256 a,
        uint8 fromDecimals,
        uint8 toDecimals
    ) internal pure returns (uint256) {
        return a / (10 ** (fromDecimals - toDecimals));
    }

    function upscale(
        int256 a,
        uint8 fromDecimals,
        uint8 toDecimals
    ) internal pure returns (int256) {
        return a * int256(10 ** (toDecimals - fromDecimals));
    }

    function downscale(
        int256 a,
        uint8 fromDecimals,
        uint8 toDecimals
    ) internal pure returns (int256) {
        return a / int256(10 ** (fromDecimals - toDecimals));
    }

    function intPow(uint256 a, uint256 n) internal pure returns (uint256) {
        uint256 result = ONE;
        for (uint256 i; i < n; ) {
            result = mulDown(result, a);
            unchecked {
                ++i;
            }
        }
        return result;
    }

    function absSub(uint256 a, uint256 b) internal pure returns (uint256) {
        unchecked {
            return a >= b ? a - b : b - a;
        }
    }

    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a <= b ? a : b;
    }
}

File 7 of 8 : IGenericOracle.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.17;

import "IOracle.sol";

interface IGenericOracle is IOracle {
    /// @notice returns the oracle to be used to price `token`
    function getOracle(address token) external view returns (IOracle);

    /// @notice converts the price of an LP token to the given underlying
    function curveLpToUnderlying(
        address curveLpToken,
        address underlying,
        uint256 curveLpAmount
    ) external view returns (uint256);

    /// @notice same as above but avoids fetching the underlying price again
    function curveLpToUnderlying(
        address curveLpToken,
        address underlying,
        uint256 curveLpAmount,
        uint256 underlyingPrice
    ) external view returns (uint256);

    /// @notice converts the price an underlying asset to a given Curve LP token
    function underlyingToCurveLp(
        address underlying,
        address curveLpToken,
        uint256 underlyingAmount
    ) external view returns (uint256);
}

File 8 of 8 : IOracle.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.17;

interface IOracle {
    event TokenUpdated(address indexed token, address feed, uint256 maxDelay, bool isEthPrice);

    /// @notice returns the price in USD of symbol.
    function getUSDPrice(address token) external view returns (uint256);

    /// @notice returns if the given token is supported for pricing.
    function isTokenSupported(address token) external view returns (bool);
}

Settings
{
  "evmVersion": "london",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "GenericOracle.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"oracle","type":"address"}],"name":"CustomOracleAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"feed","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxDelay","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isEthPrice","type":"bool"}],"name":"TokenUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"curveLpToken","type":"address"},{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint256","name":"curveLpAmount","type":"uint256"}],"name":"curveLpToUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"curveLpToken","type":"address"},{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint256","name":"curveLpAmount","type":"uint256"},{"internalType":"uint256","name":"underlyingPrice","type":"uint256"}],"name":"curveLpToUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"customOracles","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getUSDPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"curveLpOracle","type":"address"},{"internalType":"address","name":"chainlinkOracle","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isTokenSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"oracle","type":"address"}],"name":"setCustomOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"underlying","type":"address"},{"internalType":"address","name":"curveLpToken","type":"address"},{"internalType":"uint256","name":"underlyingAmount","type":"uint256"}],"name":"underlyingToCurveLp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b4e8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80637c4be525116100715780637c4be5251461015d5780638b2f0f4f146101865780638da5cb5b14610199578063d2ca1a77146101aa578063dd8b7772146101bd578063f2fde38b146101d057600080fd5b806310d3d22e146100b95780633d234791146100e9578063485cc9551461010a57806367b7b2891461011f578063715018a61461013257806375151b631461013a575b600080fd5b6100cc6100c7366004610887565b6101e3565b6040516001600160a01b0390911681526020015b60405180910390f35b6100fc6100f73660046108a2565b6102b9565b6040519081526020016100e0565b61011d6101183660046108de565b610358565b005b61011d61012d3660046108de565b6103e5565b61011d610458565b61014d610148366004610887565b61046c565b60405190151581526020016100e0565b6100cc61016b366004610887565b6001602052600090815260409020546001600160a01b031681565b6100fc610194366004610887565b610579565b6000546001600160a01b03166100cc565b6100fc6101b83660046108a2565b6105f0565b6100fc6101cb366004610911565b610601565b61011d6101de366004610887565b61068a565b6001600160a01b038181166000908152600160205260408120549091161561022457506001600160a01b039081166000908152600160205260409020541690565b6002546040516375151b6360e01b81526001600160a01b038481166004830152909116906375151b6390602401602060405180830381865afa15801561026e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102929190610953565b156102a85750506002546001600160a01b031690565b50506003546001600160a01b031690565b600061034e846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103209190610975565b601261034761032e87610579565b61034161033a8a610579565b8890610703565b90610725565b919061073e565b90505b9392505050565b61036061077f565b6003546001600160a01b0316156103b45760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b600280546001600160a01b039283166001600160a01b03199182161790915560038054939092169216919091179055565b6103ed61077f565b6001600160a01b0382811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f1b4b9cd5d281236804584b516042a4e440806fdd4d36fe010c13c54c9544f292910160405180910390a15050565b61046061077f565b61046a60006107d9565b565b6001600160a01b038181166000908152600160205260408120549091161515806104ff57506002546040516375151b6360e01b81526001600160a01b038481166004830152909116906375151b6390602401602060405180830381865afa1580156104db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ff9190610953565b8061057357506003546040516375151b6360e01b81526001600160a01b038481166004830152909116906375151b6390602401602060405180830381865afa15801561054f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105739190610953565b92915050565b6000610584826101e3565b604051638b2f0f4f60e01b81526001600160a01b0384811660048301529190911690638b2f0f4f90602401602060405180830381865afa1580156105cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105739190610998565b600061034e8484846101cb87610579565b60006106816012856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a9190610975565b6103478561034161067a8b610579565b8990610703565b95945050505050565b61069261077f565b6001600160a01b0381166106f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103ab565b610700816107d9565b50565b60006107116012600a610aab565b61071b8385610ab7565b6103519190610ace565b6000816107346012600a610aab565b61071b9085610ab7565b60008160ff168360ff1603610754575082610351565b8160ff168360ff1611156107745761076d848484610829565b9050610351565b61034e84848461084a565b6000546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ab565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006108358284610af0565b61084090600a610b09565b61034e9085610ace565b60006108568383610af0565b61086190600a610b09565b61034e9085610ab7565b80356001600160a01b038116811461088257600080fd5b919050565b60006020828403121561089957600080fd5b6103518261086b565b6000806000606084860312156108b757600080fd5b6108c08461086b565b92506108ce6020850161086b565b9150604084013590509250925092565b600080604083850312156108f157600080fd5b6108fa8361086b565b91506109086020840161086b565b90509250929050565b6000806000806080858703121561092757600080fd5b6109308561086b565b935061093e6020860161086b565b93969395505050506040820135916060013590565b60006020828403121561096557600080fd5b8151801515811461035157600080fd5b60006020828403121561098757600080fd5b815160ff8116811461035157600080fd5b6000602082840312156109aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610a025781600019048211156109e8576109e86109b1565b808516156109f557918102915b93841c93908002906109cc565b509250929050565b600082610a1957506001610573565b81610a2657506000610573565b8160018114610a3c5760028114610a4657610a62565b6001915050610573565b60ff841115610a5757610a576109b1565b50506001821b610573565b5060208310610133831016604e8410600b8410161715610a85575081810a610573565b610a8f83836109c7565b8060001904821115610aa357610aa36109b1565b029392505050565b60006103518383610a0a565b8082028115828204841417610573576105736109b1565b600082610aeb57634e487b7160e01b600052601260045260246000fd5b500490565b60ff8281168282160390811115610573576105736109b1565b600061035160ff841683610a0a56fea26469706673582212203d2a4a674cb30b7bbd064a5465de58dffa93320ecde86086ee476d392f29f74c64736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80637c4be525116100715780637c4be5251461015d5780638b2f0f4f146101865780638da5cb5b14610199578063d2ca1a77146101aa578063dd8b7772146101bd578063f2fde38b146101d057600080fd5b806310d3d22e146100b95780633d234791146100e9578063485cc9551461010a57806367b7b2891461011f578063715018a61461013257806375151b631461013a575b600080fd5b6100cc6100c7366004610887565b6101e3565b6040516001600160a01b0390911681526020015b60405180910390f35b6100fc6100f73660046108a2565b6102b9565b6040519081526020016100e0565b61011d6101183660046108de565b610358565b005b61011d61012d3660046108de565b6103e5565b61011d610458565b61014d610148366004610887565b61046c565b60405190151581526020016100e0565b6100cc61016b366004610887565b6001602052600090815260409020546001600160a01b031681565b6100fc610194366004610887565b610579565b6000546001600160a01b03166100cc565b6100fc6101b83660046108a2565b6105f0565b6100fc6101cb366004610911565b610601565b61011d6101de366004610887565b61068a565b6001600160a01b038181166000908152600160205260408120549091161561022457506001600160a01b039081166000908152600160205260409020541690565b6002546040516375151b6360e01b81526001600160a01b038481166004830152909116906375151b6390602401602060405180830381865afa15801561026e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102929190610953565b156102a85750506002546001600160a01b031690565b50506003546001600160a01b031690565b600061034e846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103209190610975565b601261034761032e87610579565b61034161033a8a610579565b8890610703565b90610725565b919061073e565b90505b9392505050565b61036061077f565b6003546001600160a01b0316156103b45760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b600280546001600160a01b039283166001600160a01b03199182161790915560038054939092169216919091179055565b6103ed61077f565b6001600160a01b0382811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f1b4b9cd5d281236804584b516042a4e440806fdd4d36fe010c13c54c9544f292910160405180910390a15050565b61046061077f565b61046a60006107d9565b565b6001600160a01b038181166000908152600160205260408120549091161515806104ff57506002546040516375151b6360e01b81526001600160a01b038481166004830152909116906375151b6390602401602060405180830381865afa1580156104db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ff9190610953565b8061057357506003546040516375151b6360e01b81526001600160a01b038481166004830152909116906375151b6390602401602060405180830381865afa15801561054f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105739190610953565b92915050565b6000610584826101e3565b604051638b2f0f4f60e01b81526001600160a01b0384811660048301529190911690638b2f0f4f90602401602060405180830381865afa1580156105cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105739190610998565b600061034e8484846101cb87610579565b60006106816012856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a9190610975565b6103478561034161067a8b610579565b8990610703565b95945050505050565b61069261077f565b6001600160a01b0381166106f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103ab565b610700816107d9565b50565b60006107116012600a610aab565b61071b8385610ab7565b6103519190610ace565b6000816107346012600a610aab565b61071b9085610ab7565b60008160ff168360ff1603610754575082610351565b8160ff168360ff1611156107745761076d848484610829565b9050610351565b61034e84848461084a565b6000546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ab565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006108358284610af0565b61084090600a610b09565b61034e9085610ace565b60006108568383610af0565b61086190600a610b09565b61034e9085610ab7565b80356001600160a01b038116811461088257600080fd5b919050565b60006020828403121561089957600080fd5b6103518261086b565b6000806000606084860312156108b757600080fd5b6108c08461086b565b92506108ce6020850161086b565b9150604084013590509250925092565b600080604083850312156108f157600080fd5b6108fa8361086b565b91506109086020840161086b565b90509250929050565b6000806000806080858703121561092757600080fd5b6109308561086b565b935061093e6020860161086b565b93969395505050506040820135916060013590565b60006020828403121561096557600080fd5b8151801515811461035157600080fd5b60006020828403121561098757600080fd5b815160ff8116811461035157600080fd5b6000602082840312156109aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610a025781600019048211156109e8576109e86109b1565b808516156109f557918102915b93841c93908002906109cc565b509250929050565b600082610a1957506001610573565b81610a2657506000610573565b8160018114610a3c5760028114610a4657610a62565b6001915050610573565b60ff841115610a5757610a576109b1565b50506001821b610573565b5060208310610133831016604e8410600b8410161715610a85575081810a610573565b610a8f83836109c7565b8060001904821115610aa357610aa36109b1565b029392505050565b60006103518383610a0a565b8082028115828204841417610573576105736109b1565b600082610aeb57634e487b7160e01b600052601260045260246000fd5b500490565b60ff8281168282160390811115610573576105736109b1565b600061035160ff841683610a0a56fea26469706673582212203d2a4a674cb30b7bbd064a5465de58dffa93320ecde86086ee476d392f29f74c64736f6c63430008110033

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.