ETH Price: $2,062.19 (-0.31%)
Gas: 0.27 Gwei

Contract

0xE0482C04C558cb3F83eE492d2A696461aF9aAb2A
 

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

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
ChainlinkAdapter

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 10000 runs

Other Settings:
shanghai EvmVersion
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

import { UtilLib } from "../utils/UtilLib.sol";

import { IExchangeRateAdapter } from "../interfaces/IExchangeRateAdapter.sol";
import { EigenpieConfigRoleChecker, IEigenpieConfig } from "../utils/EigenpieConfigRoleChecker.sol";

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

interface IAggregatorV3Interface {
    function decimals() external view returns (uint8);

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

/// @title ChainlinkPriceOracle Contract
/// @notice contract that fetches the exchange rate of assets from chainlink price feeds
contract ChainlinkAdapter is IExchangeRateAdapter, EigenpieConfigRoleChecker, Initializable {
    IAggregatorV3Interface public priceFeed;
    uint256 public dataFreshnessThreshold;

    event PriceFeedUpdate(address priceFeed);
    event DataFreshnessThresholdUpdated(uint256 oldDataFreshnessThreshold, uint256 newDataFreshnessThreshold);
    
    error OutdatedFeed();
    error InvalidThresholdValue();

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    /// @dev Initializes the contract
    /// @param eigenpieConfig_ eigenpie config address
    function initialize(address eigenpieConfig_, address priceFeed_) external initializer {
        UtilLib.checkNonZeroAddress(eigenpieConfig_);
        UtilLib.checkNonZeroAddress(priceFeed_);

        eigenpieConfig = IEigenpieConfig(eigenpieConfig_);
        priceFeed = IAggregatorV3Interface(priceFeed_);

        emit UpdatedEigenpieConfig(address(eigenpieConfig));
    }

    /// @notice Fetches LST/ETH exchange rate
    /// @return assetPrice exchange rate of asset
    function getExchangeRateToNative() external view returns (uint256) {
        // Fetch the latest round data from Chainlink
        (, int256 price,, uint256 updatedAt,) = priceFeed.latestRoundData();

        // Ensure the price feed data is not stale
        if (updatedAt < block.timestamp - dataFreshnessThreshold) {
            revert OutdatedFeed();
        }

        // Convert the price to uint256 and scale to 18 decimals
        uint8 decimals = priceFeed.decimals();
        return (uint256(price) * 1e18) / (10 ** uint256(decimals));
    }

    /// @dev add/update the price oracle of any supported asset
    /// @dev only Oracle Admin is allowed
    /// @param newPriceFeed chainlink price feed contract which contains exchange rate info
    function updatePriceFeedFor(address newPriceFeed) external onlyOracleAdmin {
        UtilLib.checkNonZeroAddress(newPriceFeed);

        priceFeed = IAggregatorV3Interface(newPriceFeed);

        emit PriceFeedUpdate(address(priceFeed));
    }

    /// @notice Updates the data freshness threshold, which determines the maximum allowable age for price feed data.
    /// @dev Only the Oracle Admin can update this threshold. This function allows updating the freshness threshold 
    ///      to ensure the contract considers only recent data for price calculations.
    /// @param newDataFreshnessThreshold The new threshold (in seconds) for data freshness.
    function updateDataFreshnessThreshold(uint256 newDataFreshnessThreshold) external onlyOracleAdmin() {
        if(newDataFreshnessThreshold <= 0) revert InvalidThresholdValue();

        uint256 oldDataFreshnessThreshold = dataFreshnessThreshold;
        dataFreshnessThreshold = newDataFreshnessThreshold;

        emit DataFreshnessThresholdUpdated(oldDataFreshnessThreshold, newDataFreshnessThreshold);
    }

}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

import {EigenpieConstants} from "./EigenpieConstants.sol";

/// @title UtilLib - Utility library
/// @notice Utility functions
library UtilLib {
    error ZeroAddressNotAllowed();

    /// @dev zero address check modifier
    /// @param address_ address to check
    function checkNonZeroAddress(address address_) internal pure {
        if (address_ == address(0)) revert ZeroAddressNotAllowed();
    }

    function isNativeToken(address addr) internal pure returns (bool) {
        return addr == EigenpieConstants.PLATFORM_TOKEN_ADDRESS;
    }
}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

interface IExchangeRateAdapter {
    function getExchangeRateToNative() external view returns (uint256);
}

File 4 of 9 : EigenpieConfigRoleChecker.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

import { UtilLib } from "./UtilLib.sol";
import { EigenpieConstants } from "./EigenpieConstants.sol";

import { IEigenpieConfig } from "../interfaces/IEigenpieConfig.sol";

import { IAccessControl } from "@openzeppelin/contracts/access/IAccessControl.sol";

/// @title EigenpieConfigRoleChecker - Eigenpie Config Role Checker Contract
/// @notice Handles Eigenpie config role checks
abstract contract EigenpieConfigRoleChecker {
    IEigenpieConfig public eigenpieConfig;

    uint256[49] private __gap; // reserve for upgrade

    // events
    event UpdatedEigenpieConfig(address indexed eigenpieConfig);

    // modifiers
    modifier onlyRole(bytes32 role) {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(role, msg.sender)) {
            string memory roleStr = string(abi.encodePacked(role));
            revert IEigenpieConfig.CallerNotEigenpieConfigAllowedRole(roleStr);
        }
        _;
    }

    modifier onlyEigenpieManager() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.MANAGER, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigManager();
        }
        _;
    }

    modifier onlyPriceProvider() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.PRICE_PROVIDER_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigPriceProvider();
        }
        _;
    }

    modifier onlyDefaultAdmin() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.DEFAULT_ADMIN_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigAdmin();
        }
        _;
    }

    modifier onlyOracleAdmin() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.ORACLE_ADMIN_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigOracleAdmin();
        }
        _;
    }

    modifier onlyOracle() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.ORACLE_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigOracle();
        }
        _;
    }

    modifier onlyMinter() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.MINTER_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigMinter();
        }
        _;
    }

    modifier onlyEGPMinter() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.EGP_MINTER_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigMinter();
        }
        _;
    }

    modifier onlyBurner() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.BURNER_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigBurner();
        }
        _;
    }

    modifier onlyEGPBurner() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.EGP_BURNER_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigBurner();
        }
        _;
    }

    modifier onlyPauser() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.PAUSER_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpiePauser();
        }
        _;
    }

    modifier onlySupportedAsset(address asset) {
        if (!eigenpieConfig.isSupportedAsset(asset)) {
            revert IEigenpieConfig.AssetNotSupported();
        }
        _;
    }

    modifier onlyAllowedBot() {
        if (!IAccessControl(address(eigenpieConfig)).hasRole(EigenpieConstants.ALLOWED_BOT_ROLE, msg.sender)) {
            revert IEigenpieConfig.CallerNotEigenpieConfigAllowedBot();
        }
        _;
    }

    // setters

    /// @notice Updates the Eigenpie config contract
    /// @dev only callable by Eigenpie default
    /// @param eigenpieConfigAddr the new Eigenpie config contract Address
    function updateEigenpieConfig(address eigenpieConfigAddr) external virtual onlyDefaultAdmin {
        UtilLib.checkNonZeroAddress(eigenpieConfigAddr);
        eigenpieConfig = IEigenpieConfig(eigenpieConfigAddr);
        emit UpdatedEigenpieConfig(eigenpieConfigAddr);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 6 of 9 : EigenpieConstants.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

library EigenpieConstants {
    //contracts
    bytes32 public constant EIGENPIE_STAKING = keccak256("EIGENPIE_STAKING");
    bytes32 public constant EIGEN_STRATEGY_MANAGER = keccak256("EIGEN_STRATEGY_MANAGER");
    bytes32 public constant EIGEN_DELEGATION_MANAGER = keccak256("EIGEN_DELEGATION_MANAGER");
    bytes32 public constant PRICE_PROVIDER = keccak256("PRICE_PROVIDER");
    bytes32 public constant BEACON_DEPOSIT = keccak256("BEACON_DEPOSIT");
    bytes32 public constant EIGENPOD_MANAGER = keccak256("EIGENPOD_MANAGER");
    bytes32 public constant EIGENPIE_PREDEPOSITHELPER = keccak256("EIGENPIE_PREDEPOSITHELPER");
    bytes32 public constant EIGENPIE_REWADR_DISTRIBUTOR = keccak256("EIGENPIE_REWADR_DISTRIBUTOR");
    bytes32 public constant EIGENPIE_DWR = keccak256("EIGENPIE_DWR");
    bytes32 public constant MLRT_ADAPTER = keccak256("MLRT_ADAPTER");

    bytes32 public constant SSVNETWORK_ENTRY = keccak256("SSVNETWORK_ENTRY");
    bytes32 public constant SSV_TOKEN = keccak256("SSV_TOKEN");

    //Roles
    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
    bytes32 public constant MANAGER = keccak256("MANAGER");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
    bytes32 public constant EGP_MINTER_ROLE = keccak256("EGP_MINTER_ROLE");
    bytes32 public constant EGP_BURNER_ROLE = keccak256("EGP_BURNER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    bytes32 public constant ORACLE_ROLE = keccak256("ORACLE_ROLE");
    bytes32 public constant ORACLE_ADMIN_ROLE = keccak256("ORACLE_ADMIN_ROLE");
    bytes32 public constant PRICE_PROVIDER_ROLE = keccak256("PRICE_PROVIDER_ROLE");

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

    // For Native Restaking
    uint256 constant PUBKEY_LENGTH = 48;
    uint256 constant SIGNATURE_LENGTH = 96;
    uint256 constant MAX_VALIDATORS = 100;
    uint256 constant DEPOSIT_AMOUNT = 32 ether;
    uint256 constant GWEI_TO_WEI = 1e9;

    // For layerzero bridging
    uint32 constant LZ_ZIRCUIT_DESTINATION_ID = 30303;
    uint32 constant LZ_ETHEREUM_DESTINATION_ID = 30101;

    uint256 public constant DENOMINATOR = 10_000;
    address public constant PLATFORM_TOKEN_ADDRESS = 0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf;
    bytes32 public constant EIGENPIE_WITHDRAW_MANAGER = keccak256("EIGENPIE_WITHDRAW_MANAGER");

    // External Defi
    bytes32 public constant ZIRCUIT_ZSTAKIGPOOL = keccak256("ZIRCUIT_ZSTAKIGPOOL");
    bytes32 public constant SWELL_SIMPLE_STAKING = keccak256("SWELL_SIMPLE_STAKING");
    bytes32 public constant ZSTAKIGPOOL_ZIRCUIT_CHAIN = keccak256("ZSTAKIGPOOL_ZIRCUIT_CHAIN");

    bytes public constant BeaconProxyBytecode =
        hex"608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564";
}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.21;

interface IEigenpieConfig {
    // Errors
    error ValueAlreadyInUse();
    error AssetAlreadySupported();
    error AssetNotSupported();
    error CallerNotEigenpieConfigAdmin();
    error CallerNotEigenpieConfigManager();
    error CallerNotEigenpieConfigOracle();
    error CallerNotEigenpieConfigOracleAdmin();
    error CallerNotEigenpieConfigPriceProvider();
    error CallerNotEigenpieConfigMinter();
    error CallerNotEigenpieConfigBurner();
    error CallerNotEigenpiePauser();
    error CallerNotEigenpieConfigAllowedRole(string role);
    error CallerNotEigenpieConfigAllowedBot();

    // Events
    event SetContract(bytes32 key, address indexed contractAddr);
    event AddedNewSupportedAsset(address indexed asset, address indexed receipt, uint256 depositLimit);
    event ReceiptTokenUpdated(address indexed asset, address indexed receipt);
    event RemovedSupportedAsset(address indexed asset);
    event AssetDepositLimitUpdate(address indexed asset, uint256 depositLimit);
    event AssetStrategyUpdate(address indexed asset, address indexed strategy);
    event AssetBoostUpdate(address indexed asset, uint256 newBoost);
    event ReferralUpdate(address indexed me, address indexed myReferral);
    event MLRTBridgeUpdated(address indexed receipt, address indexed mlrtBridge);
    event BaseGasAmountSpentUpdated(uint256 newBaseGasAmountSpent);

    // methods
    function baseGasAmountSpent() external returns (uint256);

    function assetStrategy(address asset) external view returns (address);

    function boostByAsset(address) external view returns (uint256);

    function mLRTReceiptByAsset(address) external view returns (address);

    function isSupportedAsset(address asset) external view returns (bool);

    function getContract(bytes32 contractId) external view returns (address);

    function getSupportedAssetList() external view returns (address[] memory);

    function depositLimitByAsset(address asset) external view returns (uint256);

    function getMLRTBridgeByReceipt(address receipt) external view returns (address);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @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 {AccessControl-_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 Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@arbitrum/=node_modules/@arbitrum/",
    "@axelar-network/=node_modules/@axelar-network/",
    "@chainlink/=node_modules/@chainlink/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "@layerzerolabs/=node_modules/@layerzerolabs/",
    "@offchainlabs/=node_modules/@offchainlabs/",
    "@scroll-tech/=node_modules/@scroll-tech/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "hardhat/=node_modules/hardhat/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/",
    "solidity-code-metrics/=node_modules/solidity-code-metrics/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerNotEigenpieConfigAdmin","type":"error"},{"inputs":[],"name":"CallerNotEigenpieConfigOracleAdmin","type":"error"},{"inputs":[],"name":"InvalidThresholdValue","type":"error"},{"inputs":[],"name":"OutdatedFeed","type":"error"},{"inputs":[],"name":"ZeroAddressNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDataFreshnessThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDataFreshnessThreshold","type":"uint256"}],"name":"DataFreshnessThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"priceFeed","type":"address"}],"name":"PriceFeedUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eigenpieConfig","type":"address"}],"name":"UpdatedEigenpieConfig","type":"event"},{"inputs":[],"name":"dataFreshnessThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eigenpieConfig","outputs":[{"internalType":"contract IEigenpieConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExchangeRateToNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"eigenpieConfig_","type":"address"},{"internalType":"address","name":"priceFeed_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract IAggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDataFreshnessThreshold","type":"uint256"}],"name":"updateDataFreshnessThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"eigenpieConfigAddr","type":"address"}],"name":"updateEigenpieConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPriceFeed","type":"address"}],"name":"updatePriceFeedFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f80fd5b5061001861001d565b6100dc565b603254610100900460ff16156100895760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60325460ff908116146100da576032805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b610ce6806100e95f395ff3fe608060405234801561000f575f80fd5b5060043610610085575f3560e01c8063741bef1a11610058578063741bef1a146100e057806390fa64a01461012b578063a5ed3aca1461014a578063fb722c261461015d575f80fd5b80632d53f0c814610089578063485cc9551461009e57806357487f06146100b15780636794bab2146100cd575b5f80fd5b61009c6100973660046109e6565b610165565b005b61009c6100ac366004610a06565b6102dd565b6100ba60335481565b6040519081526020015b60405180910390f35b61009c6100db3660046109e6565b610520565b6032546101069062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100c4565b5f546101069073ffffffffffffffffffffffffffffffffffffffff1681565b61009c610158366004610a37565b610661565b6100ba6107ca565b5f546040517f91d148540000000000000000000000000000000000000000000000000000000081527fc307c44629779eb8fc0b85f224c3d22f5876a6c84de0ee42d481eb7814f0d3a8600482015233602482015273ffffffffffffffffffffffffffffffffffffffff909116906391d1485490604401602060405180830381865afa1580156101f6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021a9190610a4e565b610250576040517f3a35eb6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102598161096e565b603280547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff8481168202929092179283905560405192041681527fddcc21be684c966209b6f56a96e50f3034f7f931ff5fc9cdf79ad684e32f89039060200160405180910390a150565b603254610100900460ff16158080156102fd5750603254600160ff909116105b806103175750303b158015610317575060325460ff166001145b6103a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840160405180910390fd5b603280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561040557603280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61040e8361096e565b6104178261096e565b5f805473ffffffffffffffffffffffffffffffffffffffff8086167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216821783556032805491861662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405190917f2efdefb1c59d8a7dfe9f3c23f4f98ebc2d088d8ffb45f79d70535c43db1e013a91a2801561051b57603280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b5f80546040517f91d14854000000000000000000000000000000000000000000000000000000008152600481019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906391d1485490604401602060405180830381865afa158015610592573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b69190610a4e565b6105ec576040517fbda7a53b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105f58161096e565b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f2efdefb1c59d8a7dfe9f3c23f4f98ebc2d088d8ffb45f79d70535c43db1e013a91a250565b5f546040517f91d148540000000000000000000000000000000000000000000000000000000081527fc307c44629779eb8fc0b85f224c3d22f5876a6c84de0ee42d481eb7814f0d3a8600482015233602482015273ffffffffffffffffffffffffffffffffffffffff909116906391d1485490604401602060405180830381865afa1580156106f2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107169190610a4e565b61074c576040517f3a35eb6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8111610785576040517f011659b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603380549082905560408051828152602081018490527f7e2fd2efe06ad8d68e6be7733f9ef171f82d6d26fd194651e4d15984b07aeba8910160405180910390a15050565b5f805f603260029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610838573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061085c9190610a86565b50935050925050603354426108719190610aff565b8110156108aa576040517fc135b91800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f603260029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610916573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061093a9190610b18565b905061094a60ff8216600a610c56565b61095c84670de0b6b3a7640000610c61565b6109669190610c78565b935050505090565b73ffffffffffffffffffffffffffffffffffffffff81166109bb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e1575f80fd5b919050565b5f602082840312156109f6575f80fd5b6109ff826109be565b9392505050565b5f8060408385031215610a17575f80fd5b610a20836109be565b9150610a2e602084016109be565b90509250929050565b5f60208284031215610a47575f80fd5b5035919050565b5f60208284031215610a5e575f80fd5b815180151581146109ff575f80fd5b805169ffffffffffffffffffff811681146109e1575f80fd5b5f805f805f60a08688031215610a9a575f80fd5b610aa386610a6d565b9450602086015193506040860151925060608601519150610ac660808701610a6d565b90509295509295909350565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610b1257610b12610ad2565b92915050565b5f60208284031215610b28575f80fd5b815160ff811681146109ff575f80fd5b600181815b80851115610b9157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610b7757610b77610ad2565b80851615610b8457918102915b93841c9390800290610b3d565b509250929050565b5f82610ba757506001610b12565b81610bb357505f610b12565b8160018114610bc95760028114610bd357610bef565b6001915050610b12565b60ff841115610be457610be4610ad2565b50506001821b610b12565b5060208310610133831016604e8410600b8410161715610c12575081810a610b12565b610c1c8383610b38565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610c4e57610c4e610ad2565b029392505050565b5f6109ff8383610b99565b8082028115828204841417610b1257610b12610ad2565b5f82610cab577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212200e4297e306254448fe839e9662d05898c8cb6ab86cf37e1a7dfa83f25d00507664736f6c63430008150033

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610085575f3560e01c8063741bef1a11610058578063741bef1a146100e057806390fa64a01461012b578063a5ed3aca1461014a578063fb722c261461015d575f80fd5b80632d53f0c814610089578063485cc9551461009e57806357487f06146100b15780636794bab2146100cd575b5f80fd5b61009c6100973660046109e6565b610165565b005b61009c6100ac366004610a06565b6102dd565b6100ba60335481565b6040519081526020015b60405180910390f35b61009c6100db3660046109e6565b610520565b6032546101069062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100c4565b5f546101069073ffffffffffffffffffffffffffffffffffffffff1681565b61009c610158366004610a37565b610661565b6100ba6107ca565b5f546040517f91d148540000000000000000000000000000000000000000000000000000000081527fc307c44629779eb8fc0b85f224c3d22f5876a6c84de0ee42d481eb7814f0d3a8600482015233602482015273ffffffffffffffffffffffffffffffffffffffff909116906391d1485490604401602060405180830381865afa1580156101f6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021a9190610a4e565b610250576040517f3a35eb6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102598161096e565b603280547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff8481168202929092179283905560405192041681527fddcc21be684c966209b6f56a96e50f3034f7f931ff5fc9cdf79ad684e32f89039060200160405180910390a150565b603254610100900460ff16158080156102fd5750603254600160ff909116105b806103175750303b158015610317575060325460ff166001145b6103a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840160405180910390fd5b603280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561040557603280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61040e8361096e565b6104178261096e565b5f805473ffffffffffffffffffffffffffffffffffffffff8086167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216821783556032805491861662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff90921691909117905560405190917f2efdefb1c59d8a7dfe9f3c23f4f98ebc2d088d8ffb45f79d70535c43db1e013a91a2801561051b57603280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b5f80546040517f91d14854000000000000000000000000000000000000000000000000000000008152600481019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906391d1485490604401602060405180830381865afa158015610592573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b69190610a4e565b6105ec576040517fbda7a53b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105f58161096e565b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f2efdefb1c59d8a7dfe9f3c23f4f98ebc2d088d8ffb45f79d70535c43db1e013a91a250565b5f546040517f91d148540000000000000000000000000000000000000000000000000000000081527fc307c44629779eb8fc0b85f224c3d22f5876a6c84de0ee42d481eb7814f0d3a8600482015233602482015273ffffffffffffffffffffffffffffffffffffffff909116906391d1485490604401602060405180830381865afa1580156106f2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107169190610a4e565b61074c576040517f3a35eb6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8111610785576040517f011659b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603380549082905560408051828152602081018490527f7e2fd2efe06ad8d68e6be7733f9ef171f82d6d26fd194651e4d15984b07aeba8910160405180910390a15050565b5f805f603260029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610838573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061085c9190610a86565b50935050925050603354426108719190610aff565b8110156108aa576040517fc135b91800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f603260029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610916573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061093a9190610b18565b905061094a60ff8216600a610c56565b61095c84670de0b6b3a7640000610c61565b6109669190610c78565b935050505090565b73ffffffffffffffffffffffffffffffffffffffff81166109bb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e1575f80fd5b919050565b5f602082840312156109f6575f80fd5b6109ff826109be565b9392505050565b5f8060408385031215610a17575f80fd5b610a20836109be565b9150610a2e602084016109be565b90509250929050565b5f60208284031215610a47575f80fd5b5035919050565b5f60208284031215610a5e575f80fd5b815180151581146109ff575f80fd5b805169ffffffffffffffffffff811681146109e1575f80fd5b5f805f805f60a08688031215610a9a575f80fd5b610aa386610a6d565b9450602086015193506040860151925060608601519150610ac660808701610a6d565b90509295509295909350565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610b1257610b12610ad2565b92915050565b5f60208284031215610b28575f80fd5b815160ff811681146109ff575f80fd5b600181815b80851115610b9157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610b7757610b77610ad2565b80851615610b8457918102915b93841c9390800290610b3d565b509250929050565b5f82610ba757506001610b12565b81610bb357505f610b12565b8160018114610bc95760028114610bd357610bef565b6001915050610b12565b60ff841115610be457610be4610ad2565b50506001821b610b12565b5060208310610133831016604e8410600b8410161715610c12575081810a610b12565b610c1c8383610b38565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610c4e57610c4e610ad2565b029392505050565b5f6109ff8383610b99565b8082028115828204841417610b1257610b12610ad2565b5f82610cab577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212200e4297e306254448fe839e9662d05898c8cb6ab86cf37e1a7dfa83f25d00507664736f6c63430008150033

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

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.