ETH Price: $2,088.12 (-1.61%)

Contract

0xf66CBAFd8B4A707aA3E2A492Fcf325AE1fa46bb6
 

Overview

ETH Balance

62 ETH

Eth Value

$129,463.74 (@ $2,088.12/ETH)

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

5 Internal Transactions found.

Latest 5 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Deposit245869002026-03-04 21:51:5928 hrs ago1772661119
0xf66CBAFd...E1fa46bb6
1 ETH
Assign Funds245869002026-03-04 21:51:5928 hrs ago1772661119
0xf66CBAFd...E1fa46bb6
32 ETH
Deposit245869002026-03-04 21:51:5928 hrs ago1772661119
0xf66CBAFd...E1fa46bb6
1 ETH
Assign Funds245869002026-03-04 21:51:5928 hrs ago1772661119
0xf66CBAFd...E1fa46bb6
32 ETH
0x3d602d80245185222026-02-23 8:54:1110 days ago1771836851  Contract Creation0 ETH
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

Minimal Proxy Contract for 0x1b389d76a04d01026c5f5b0a125d4ccf26f9cd51

Contract Name:
RocketMegapoolProxy

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 15000 runs

Other Settings:
paris EvmVersion, GNU GPLv3 license

Contract Source Code (Solidity Standard Json-Input format)

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.8.30;

import {RocketStorageInterface} from "../../interface/RocketStorageInterface.sol";
import {RocketMegapoolDelegateBaseInterface} from "../../interface/megapool/RocketMegapoolDelegateBaseInterface.sol";
import {RocketMegapoolProxyInterface} from "../../interface/megapool/RocketMegapoolProxyInterface.sol";
import {RocketMegapoolStorageLayout} from "./RocketMegapoolStorageLayout.sol";

/// @notice Contains the initialisation and delegate upgrade logic for megapools.
///         All other calls are delegated to the node operator's current delegate or optionally the latest.
contract RocketMegapoolProxy is RocketMegapoolProxyInterface, RocketMegapoolStorageLayout {
    // Events
    event EtherReceived(address indexed from, uint256 amount, uint256 time);
    event DelegateUpgraded(address oldDelegate, address newDelegate, uint256 time);
    event UseLatestUpdated(bool state, uint256 time);

    // Immutables
    address immutable private self;
    RocketStorageInterface immutable private rocketStorage;

    // Construct
    constructor (RocketStorageInterface _rocketStorage) {
        self = address(this);
        rocketStorage = _rocketStorage;
    }

    /// @dev Prevent direct calls to this contract
    modifier notSelf() {
        require(address(this) != self);
        _;
    }

    /// @dev Only allow access from the owning node address
    modifier onlyMegapoolOwner() {
        // Only the node operator can upgrade
        address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(nodeAddress);
        require(msg.sender == nodeAddress || msg.sender == withdrawalAddress, "Only the node operator can access this method");
        _;
    }

    /// @notice Sets up the initial delegate
    /// @param _nodeAddress The owner of this megapool
    function initialise(address _nodeAddress) external override notSelf {
        // Check input
        require(_nodeAddress != address(0), "Invalid node address");
        require(!storageState, "Already initialised");
        // Flag storage state as initialised and record node address
        storageState = true;
        nodeAddress = _nodeAddress;
        // Set the current delegate (checking it exists)
        address delegateAddress = getContractAddress("rocketMegapoolDelegate");
        require(contractExists(delegateAddress), "Delegate contract does not exist");
        rocketMegapoolDelegate = delegateAddress;
    }

    /// @notice Receive an ETH deposit
    receive() external payable notSelf {
        // Emit ether received event
        emit EtherReceived(msg.sender, msg.value, block.timestamp);
    }

    /// @notice Delegates all other calls to megapool delegate contract (or latest if flag is set)
    /// @param _input Transaction calldata that is passed directly to the delegate
    fallback(bytes calldata _input) external payable notSelf returns (bytes memory) {
        address delegateContract;
        // If useLatestDelegate is set, use the latest delegate contract otherwise use stored and check expiry
        if (useLatestDelegate) {
            delegateContract = getContractAddress("rocketMegapoolDelegate");
        } else {
            // Force delegate upgrade on expiry
            if (getDelegateExpired()) {
                _delegateUpgrade();
            }
            delegateContract = rocketMegapoolDelegate;
        }
        // Check for contract existence
        require(contractExists(delegateContract), "Delegate contract does not exist");
        // Execute delegatecall on the delegate contract
        (bool success, bytes memory data) = delegateContract.delegatecall(_input);
        if (!success) {
            revert(getRevertMessage(data));
        }
        return data;
    }

    /// @notice Upgrade this megapool to the latest network delegate contract
    function delegateUpgrade() public override notSelf {
        // Only owner can upgrade if delegate hasn't expired
        if (!getDelegateExpired()) {
            address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(nodeAddress);
            require(msg.sender == nodeAddress || msg.sender == withdrawalAddress, "Only the node operator can access this method");
        }
        // Perform upgrade
        _delegateUpgrade();
    }

    /// @dev Internal implementation of delegate upgrade
    function _delegateUpgrade() internal {
        // Only succeed if there is a new delegate to upgrade to
        address oldDelegate = rocketMegapoolDelegate;
        address newDelegate = getContractAddress("rocketMegapoolDelegate");
        require(oldDelegate != newDelegate, "Already using latest");
        // Set new delegate
        rocketMegapoolDelegate = newDelegate;
        // Log event
        emit DelegateUpgraded(oldDelegate, newDelegate, block.timestamp);
    }

    /// @notice Sets the flag to automatically use the latest delegate contract or not
    /// @param _state If true, will always use the latest delegate contract
    function setUseLatestDelegate(bool _state) external override onlyMegapoolOwner notSelf {
        // Prevent modification if already set to desired state
        require(useLatestDelegate != _state, "Already set");
        // Update state
        useLatestDelegate = _state;
        // Log event
        emit UseLatestUpdated(_state, block.timestamp);
        if (!_state) {
            // Upon disabling use latest, set their current delegate to the latest
            address newDelegate = getContractAddress("rocketMegapoolDelegate");
            if (newDelegate != rocketMegapoolDelegate) {
                delegateUpgrade();
            }
        }
    }

    /// @notice Returns true if this megapool always uses the latest delegate contract
    function getUseLatestDelegate() external override view returns (bool) {
        return useLatestDelegate;
    }

    /// @notice Returns the address of the megapool's stored delegate
    function getDelegate() external override view returns (address) {
        return rocketMegapoolDelegate;
    }

    /// @notice Returns the delegate which will be used when calling this megapool taking into account
    ///         useLatestDelegate setting and expired delegate
    function getEffectiveDelegate() external override view returns (address) {
        if (useLatestDelegate || getDelegateExpired()) {
            return getContractAddress("rocketMegapoolDelegate");
        }
        return rocketMegapoolDelegate;
    }

    /// @notice Returns true if the megapools current delegate has expired
    function getDelegateExpired() public view returns (bool) {
        RocketMegapoolDelegateBaseInterface megapoolDelegate = RocketMegapoolDelegateBaseInterface(rocketMegapoolDelegate);
        uint256 expiry = megapoolDelegate.getExpirationTime();
        return expiry != 0 && block.timestamp >= expiry;
    }

    /// @dev Get the address of a Rocket Pool network contract
    function getContractAddress(string memory _contractName) private view returns (address) {
        address contractAddress = rocketStorage.getAddress(keccak256(abi.encodePacked("contract.address", _contractName)));
        require(contractAddress != address(0x0), "Contract not found");
        return contractAddress;
    }

    /// @dev Get a revert message from delegatecall return data
    function getRevertMessage(bytes memory _returnData) private pure returns (string memory) {
        if (_returnData.length < 68) {
            return "Transaction reverted silently";
        }
        assembly {
            _returnData := add(_returnData, 0x04)
        }
        return abi.decode(_returnData, (string));
    }

    /// @dev Returns true if contract exists at _contractAddress (if called during that contract's construction it will return a false negative)
    function contractExists(address _contractAddress) private view returns (bool) {
        uint32 codeSize;
        assembly {
            codeSize := extcodesize(_contractAddress)
        }
        return codeSize > 0;
    }

}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >0.5.0 <0.9.0;

interface RocketStorageInterface {

    // Deploy status
    function getDeployedStatus() external view returns (bool);

    // Guardian
    function getGuardian() external view returns(address);
    function setGuardian(address _newAddress) external;
    function confirmGuardian() external;

    // Getters
    function getAddress(bytes32 _key) external view returns (address);
    function getUint(bytes32 _key) external view returns (uint);
    function getString(bytes32 _key) external view returns (string memory);
    function getBytes(bytes32 _key) external view returns (bytes memory);
    function getBool(bytes32 _key) external view returns (bool);
    function getInt(bytes32 _key) external view returns (int);
    function getBytes32(bytes32 _key) external view returns (bytes32);

    // Setters
    function setAddress(bytes32 _key, address _value) external;
    function setUint(bytes32 _key, uint _value) external;
    function setString(bytes32 _key, string calldata _value) external;
    function setBytes(bytes32 _key, bytes calldata _value) external;
    function setBool(bytes32 _key, bool _value) external;
    function setInt(bytes32 _key, int _value) external;
    function setBytes32(bytes32 _key, bytes32 _value) external;

    // Deleters
    function deleteAddress(bytes32 _key) external;
    function deleteUint(bytes32 _key) external;
    function deleteString(bytes32 _key) external;
    function deleteBytes(bytes32 _key) external;
    function deleteBool(bytes32 _key) external;
    function deleteInt(bytes32 _key) external;
    function deleteBytes32(bytes32 _key) external;

    // Arithmetic
    function addUint(bytes32 _key, uint256 _amount) external;
    function subUint(bytes32 _key, uint256 _amount) external;

    // Protected storage
    function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address);
    function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address);
    function setWithdrawalAddress(address _nodeAddress, address _newWithdrawalAddress, bool _confirm) external;
    function confirmWithdrawalAddress(address _nodeAddress) external;
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >0.5.0 <0.9.0;

import "../../interface/RocketStorageInterface.sol";

interface RocketMegapoolDelegateBaseInterface {
    function deprecate() external;
    function getExpirationTime() external view returns (uint256);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >0.5.0 <0.9.0;

import "../../interface/RocketStorageInterface.sol";

interface RocketMegapoolProxyInterface {
    function initialise(address _nodeAddress) external;
    function delegateUpgrade() external;
    function setUseLatestDelegate(bool _state) external;
    function getUseLatestDelegate() external view returns (bool);
    function getDelegate() external view returns (address);
    function getEffectiveDelegate() external view returns (address);
    function getDelegateExpired() external view returns (bool);
}

File 5 of 5 : RocketMegapoolStorageLayout.sol
/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.8.30;

import {RocketStorageInterface} from "../../interface/RocketStorageInterface.sol";

// ******************************************************
// Note: This contract MUST only be appended to. All
// deployed megapool contracts must maintain a
// consistent storage layout with RocketMegapoolDelegate.
// ******************************************************

/// @dev The RocketMegapool contract storage layout, shared by RocketMegapoolDelegate and RocketMegapoolBase
abstract contract RocketMegapoolStorageLayout {
    // Status of individual validators
    enum Status {
        InQueue,
        PreStaked,
        Staking,
        Exited,
        Dissolved
    }

    // Information about individual validators
    struct ValidatorInfo {
        uint32 lastAssignmentTime;  // Timestamp of when the last fund assignment took place
        uint32 lastRequestedValue;  // Value in milliether last requested
        uint32 lastRequestedBond;   // Value in milliether of the bond supplied for last request for funds
        uint32 depositValue;        // Total amount deposited to beaconchain in gwei

        bool staked;        // Whether the validator has staked the minimum required to begin validating (32 ETH)
        bool exited;        // Whether the validator has exited the beacon chain
        bool inQueue;       // Whether the validator is currently awaiting funds from the deposit pool
        bool inPrestake;    // Whether the validator is currently awaiting the stake operation
        bool expressUsed;   // Whether the last request for funds consumed an express ticket
        bool dissolved;     // Whether the validator failed to prestake their initial deposit in time
        bool exiting;       // Whether the validator is queued to exit on the beaconchain
        bool locked;        // Whether the validator has been locked by the oDAO for not exiting

        uint64 exitBalance;         // Final balance of the validator at withdrawable_epoch in gwei (amount returned to EL)
        uint64 lockedTime;          // The slot this validator was challenged about its exit status
    }

    //
    // Delegate state
    //

    bool internal storageState;           // Used to prevent direct calls to the delegate contract
    uint256 internal expirationTime;      // Used to store the expiry timestamp of this delegate (0 meaning not expiring)

    //
    // Proxy state
    //

    address internal rocketMegapoolDelegate;  // The current delegate contract address
    bool internal useLatestDelegate;          // Whether this proxy always uses the latest delegate

    //
    // Megapool state
    //

    address internal nodeAddress;             // Megapool owner
    uint32 internal numValidators;            // Number of individual validators handled by this megapool
    uint32 internal numInactiveValidators;    // Number of validators that are no longer contributing to bond requirement

    uint256 internal assignedValue;   // ETH assigned from DP pending prestake/stake
    uint256 internal refundValue;     // ETH refunded to the owner after a dissolution

    uint256 internal nodeBond;              // Value of node ETH bond (including value yet to be assigned/deposited)
    uint256 internal userCapital;           // Value of user supplied capital (including value yet to be assigned/deposited)
    uint256 internal nodeQueuedBond;        // Value of node ETH bond (yet to be assigned/deposited to beacon chain)
    uint256 internal userQueuedCapital;     // Value of user supplied capital (yet to be assigned/deposited to beacon chain)

    uint256 internal debt;            // Amount the owner owes the DP

    uint256 internal lastDistributionTime; // The block of the last time a distribution of rewards was executed

    mapping(uint32 => ValidatorInfo) internal validators;
    mapping(uint32 => bytes) internal prestakeSignatures;
    mapping(uint32 => bytes) internal pubkeys;

    uint32 internal numLockedValidators;        // Number of validators currently locked
    uint32 internal numExitingValidators;       // Number of validators currently exiting

    uint256 internal __version1Boundary;        // Unused full slot width boundary
}

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 15000
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

API
[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorage","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldDelegate","type":"address"},{"indexed":false,"internalType":"address","name":"newDelegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"DelegateUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"EtherReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"UseLatestUpdated","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"delegateUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDelegateExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEffectiveDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUseLatestDelegate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"initialise","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setUseLatestDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.