Hoodi Testnet

Contract

0x060fB8cB02F85171eEA1b219E97f6CF72ebEA7f7
Source Code Source Code

Overview

ETH Balance

0 ETH

More Info

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Amount
Deposit7334632025-07-04 5:54:36197 days ago1751608476IN
0x060fB8cB...72ebEA7f7
4 ETH0.00122982
Deposit7334602025-07-04 5:54:00197 days ago1751608440IN
0x060fB8cB...72ebEA7f7
4 ETH0.001500722
Deposit6386622025-06-20 2:06:24211 days ago1750385184IN
0x060fB8cB...72ebEA7f7
4 ETH0.001979923
Deposit6304272025-06-18 20:23:36212 days ago1750278216IN
0x060fB8cB...72ebEA7f7
4 ETH0.001688482.88234136
Deposit6104552025-06-15 20:39:48215 days ago1750019988IN
0x060fB8cB...72ebEA7f7
4 ETH0.001814623.04784647
Deposit5967752025-06-13 19:24:24217 days ago1749842664IN
0x060fB8cB...72ebEA7f7
4 ETH0.001834532.92817373
Deposit5967402025-06-13 19:17:00217 days ago1749842220IN
0x060fB8cB...72ebEA7f7
4 ETH0.002307953.08787581
Deposit5827592025-06-11 17:28:00219 days ago1749662880IN
0x060fB8cB...72ebEA7f7
4 ETH0.001719543.02389522
Deposit5827562025-06-11 17:27:24219 days ago1749662844IN
0x060fB8cB...72ebEA7f7
4 ETH0.001663052.93695474
Deposit5827552025-06-11 17:27:12219 days ago1749662832IN
0x060fB8cB...72ebEA7f7
4 ETH0.00176213.06636558
Deposit5827542025-06-11 17:27:00219 days ago1749662820IN
0x060fB8cB...72ebEA7f7
4 ETH0.001677582.96278644
Deposit5827532025-06-11 17:26:48219 days ago1749662808IN
0x060fB8cB...72ebEA7f7
4 ETH0.001640382.88443137
Deposit5827522025-06-11 17:26:36219 days ago1749662796IN
0x060fB8cB...72ebEA7f7
4 ETH0.001873723.00658702
Deposit5827492025-06-11 17:26:00219 days ago1749662760IN
0x060fB8cB...72ebEA7f7
4 ETH0.001837752.91934708
Deposit5827402025-06-11 17:24:00219 days ago1749662640IN
0x060fB8cB...72ebEA7f7
4 ETH0.002163312.89435716
Deposit4243142025-05-19 5:52:00243 days ago1747633920IN
0x060fB8cB...72ebEA7f7
4 ETH0.001884013
Deposit4243122025-05-19 5:51:36243 days ago1747633896IN
0x060fB8cB...72ebEA7f7
4 ETH0.001901973
Deposit3578302025-05-09 15:51:48252 days ago1746805908IN
0x060fB8cB...72ebEA7f7
4 ETH0.001802512.94917417
Deposit3041422025-05-01 19:45:24260 days ago1746128724IN
0x060fB8cB...72ebEA7f7
4 ETH0.001879233
Deposit3041402025-05-01 19:45:00260 days ago1746128700IN
0x060fB8cB...72ebEA7f7
4 ETH0.001879193
Deposit3041372025-05-01 19:44:24260 days ago1746128664IN
0x060fB8cB...72ebEA7f7
4 ETH0.001879233
Deposit3041352025-05-01 19:44:00260 days ago1746128640IN
0x060fB8cB...72ebEA7f7
4 ETH0.001879193
Deposit3041322025-05-01 19:43:24260 days ago1746128604IN
0x060fB8cB...72ebEA7f7
4 ETH0.002309932.93057281
Deposit3041252025-05-01 19:42:00260 days ago1746128520IN
0x060fB8cB...72ebEA7f7
4 ETH0.001879193
Deposit3041222025-05-01 19:41:24260 days ago1746128484IN
0x060fB8cB...72ebEA7f7
4 ETH0.001949263
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Amount
Maybe Assign Dep...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Node Deposit7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
4 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Base Bond Ar...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Bond Require...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
New Validator7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Add Validator7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Validator Co...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Or Deploy Co...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Deposit Enab...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Initialise Votin...7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Bool7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334632025-07-04 5:54:36197 days ago1751608476
0x060fB8cB...72ebEA7f7
0 ETH
Maybe Assign Dep...7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
0 ETH
Node Deposit7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
4 ETH
Get Address7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
0 ETH
Get Base Bond Ar...7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
0 ETH
Get Address7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
0 ETH
Get Bond Require...7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
0 ETH
New Validator7334602025-07-04 5:54:00197 days ago1751608440
0x060fB8cB...72ebEA7f7
0 ETH
View All Internal Transactions
Loading...
Loading

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:
RocketNodeDeposit

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 15000 runs

Other Settings:
default 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.18;

import {RocketStorageInterface} from "../../interface/RocketStorageInterface.sol";
import {RocketVaultInterface} from "../../interface/RocketVaultInterface.sol";
import {RocketVaultWithdrawerInterface} from "../../interface/RocketVaultWithdrawerInterface.sol";
import {RocketDAOProtocolSettingsNodeInterface} from "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol";
import {RocketDepositPoolInterface} from "../../interface/deposit/RocketDepositPoolInterface.sol";
import {RocketMegapoolFactoryInterface} from "../../interface/megapool/RocketMegapoolFactoryInterface.sol";
import {RocketMegapoolInterface} from "../../interface/megapool/RocketMegapoolInterface.sol";
import {RocketMegapoolManagerInterface} from "../../interface/megapool/RocketMegapoolManagerInterface.sol";
import {RocketNetworkSnapshotsInterface} from "../../interface/network/RocketNetworkSnapshotsInterface.sol";
import {RocketNetworkVotingInterface} from "../../interface/network/RocketNetworkVotingInterface.sol";
import {RocketNodeDepositInterface} from "../../interface/node/RocketNodeDepositInterface.sol";
import {RocketNodeStakingInterface} from "../../interface/node/RocketNodeStakingInterface.sol";
import {RocketBase} from "../RocketBase.sol";

/// @notice Entry point for node operators to perform deposits for the creation of new validators on the network
contract RocketNodeDeposit is RocketBase, RocketNodeDepositInterface, RocketVaultWithdrawerInterface {
    // Constants
    uint256 constant internal pubKeyLength = 48;
    uint256 constant internal signatureLength = 96;

    // Events
    event DepositReceived(address indexed from, uint256 amount, uint256 time);
    event DepositFor(address indexed nodeAddress, address indexed from, uint256 amount, uint256 time);
    event Withdrawal(address indexed nodeAddress, address indexed to, uint256 amount, uint256 time);

    constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
        version = 5;
    }

    /// @notice Accept incoming ETH from the deposit pool
    receive() external payable onlyLatestContract("rocketDepositPool", msg.sender) {}

    /// @notice Accept incoming ETH from the vault
    function receiveVaultWithdrawalETH() external payable {}

    /// @notice Returns the bond requirement for the given number of validators
    function getBondRequirement(uint256 _numValidators) override public view returns (uint256) {
        if (_numValidators == 0) {
            return 0;
        }
        // Get contracts
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Calculate bond requirement
        uint256[] memory baseBondArray = rocketDAOProtocolSettingsNode.getBaseBondArray();
        if (_numValidators - 1 < baseBondArray.length) {
            return baseBondArray[_numValidators - 1];
        }
        uint256 reducedBond = rocketDAOProtocolSettingsNode.getReducedBond();
        return baseBondArray[baseBondArray.length - 1] + (_numValidators - baseBondArray.length) * reducedBond;
    }

    /// @notice Returns a node operator's credit balance in wei
    function getNodeDepositCredit(address _nodeOperator) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.deposit.credit.balance", _nodeOperator)));
    }

    /// @notice Returns the current ETH balance for the given node operator
    function getNodeEthBalance(address _nodeAddress) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.eth.balance", _nodeAddress)));
    }

    /// @notice Returns the sum of the credit balance of a given node operator and their balance
    function getNodeCreditAndBalance(address _nodeAddress) override external view returns (uint256) {
        return getNodeDepositCredit(_nodeAddress) + getNodeEthBalance(_nodeAddress);
    }

    /// @notice Returns the sum of the amount of ETH credit currently usable by a given node operator and their balance
    function getNodeUsableCreditAndBalance(address _nodeAddress) override external view returns (uint256) {
        return getNodeUsableCredit(_nodeAddress) + getNodeEthBalance(_nodeAddress);
    }

    /// @notice Returns the amount of ETH credit currently usable by a given node operator
    function getNodeUsableCredit(address _nodeAddress) override public view returns (uint256) {
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        uint256 depositPoolBalance = rocketDepositPool.getBalance();
        uint256 usableCredit = getNodeDepositCredit(_nodeAddress);
        if (usableCredit > depositPoolBalance) {
            usableCredit = depositPoolBalance;
        }
        return usableCredit;
    }

    /// @dev Increases a node operators deposit credit balance
    function increaseDepositCreditBalance(address _nodeOperator, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) {
        // Accept calls from network contracts or registered minipools
        require(getBool(keccak256(abi.encodePacked("minipool.exists", msg.sender))) ||
        getBool(keccak256(abi.encodePacked("contract.exists", msg.sender))),
            "Invalid or outdated network contract");
        // Increase credit balance
        addUint(keccak256(abi.encodePacked("node.deposit.credit.balance", _nodeOperator)), _amount);
    }

    /// @notice Deposits ETH for the given node operator
    /// @param _nodeAddress The address of the node operator to deposit ETH for
    function depositEthFor(address _nodeAddress) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(_nodeAddress) {
        // Send the ETH to vault
        uint256 amount = msg.value;
        RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
        rocketVault.depositEther{value: amount}();
        // Increment balance
        addUint(keccak256(abi.encodePacked("node.eth.balance", _nodeAddress)), amount);
        // Log it
        emit DepositFor(_nodeAddress, msg.sender, amount, block.timestamp);
    }

    /// @notice Withdraws ETH from a node operator's balance. Must be called from withdrawal address.
    /// @param _nodeAddress Address of the node operator to withdraw from
    /// @param _amount Amount of ETH to withdraw
    function withdrawEth(address _nodeAddress, uint256 _amount) external onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(_nodeAddress) {
        // Check valid caller
        address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress);
        require(msg.sender == withdrawalAddress, "Only withdrawal address can withdraw ETH");
        // Check balance and update
        uint256 balance = getNodeEthBalance(_nodeAddress);
        require(balance >= _amount, "Insufficient balance");
        setUint(keccak256(abi.encodePacked("node.eth.balance", _nodeAddress)), balance - _amount);
        // Withdraw the funds
        RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
        rocketVault.withdrawEther(_amount);
        // Send funds to withdrawalAddress
        (bool success,) = withdrawalAddress.call{value: _amount}("");
        require(success, "Failed to withdraw ETH");
        // Log it
        emit DepositFor(_nodeAddress, withdrawalAddress, _amount, block.timestamp);
    }

    /// @notice Accept a node deposit and create a new validator under the node. Only accepts calls from registered nodes
    /// @param _bondAmount The amount of capital the node operator wants to put up as his bond
    /// @param _useExpressTicket If the express queue should be used 
    /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate
    /// @param _validatorSignature Signature from the validator over the deposit data
    /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake)
    function deposit(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        // Check amount
        require(msg.value == _bondAmount, "Invalid value");
        // Process the deposit
        _deposit(_bondAmount, _useExpressTicket, _validatorPubkey, _validatorSignature, _depositDataRoot, msg.value);
    }

    /// @notice Accept a node deposit and create a new minipool under the node. Only accepts calls from registered nodes
    /// @param _bondAmount The amount of capital the node operator wants to put up as his bond
    /// @param _useExpressTicket If the express queue should be used 
    /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate
    /// @param _validatorSignature Signature from the validator over the deposit data
    /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake)
    function depositWithCredit(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        uint256 balanceToUse = 0;
        uint256 creditToUse = 0;
        uint256 shortFall = _bondAmount - msg.value;
        uint256 credit = getNodeUsableCredit(msg.sender);
        uint256 balance = getNodeEthBalance(msg.sender);
        // Check credit
        require(credit + balance >= shortFall, "Insufficient credit");
        // Calculate amounts to use
        creditToUse = shortFall;
        if (credit < shortFall) {
            balanceToUse = shortFall - credit;
            creditToUse = credit;
        }
        // Update balances
        if (balanceToUse > 0) {
            subUint(keccak256(abi.encodePacked("node.eth.balance", msg.sender)), balanceToUse);
            // Withdraw the funds
            RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
            rocketVault.withdrawEther(balanceToUse);
        }
        if (creditToUse > 0) {
            subUint(keccak256(abi.encodePacked("node.deposit.credit.balance", msg.sender)), creditToUse);
        }
        // Process the deposit
        _deposit(_bondAmount, _useExpressTicket, _validatorPubkey, _validatorSignature, _depositDataRoot, msg.value + balanceToUse);
    }

    /// @dev Internal logic to process a deposit
    function _deposit(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _value) private {
        // Validate arguments
        validateBytes(_validatorPubkey, pubKeyLength);
        validateBytes(_validatorSignature, signatureLength);
        // Check pre-conditions
        checkVotingInitialised();
        checkDepositsEnabled();
        // Emit deposit received event
        emit DepositReceived(msg.sender, _value, block.timestamp);
        // Get or deploy a megapool for the caller
        RocketMegapoolFactoryInterface rocketMegapoolFactory = RocketMegapoolFactoryInterface(getContractAddress("rocketMegapoolFactory"));
        RocketMegapoolInterface megapool = RocketMegapoolInterface(rocketMegapoolFactory.getOrDeployContract(msg.sender));
        RocketMegapoolManagerInterface rocketMegapoolManager = RocketMegapoolManagerInterface(getContractAddress("rocketMegapoolManager"));
        // Request a new validator from the megapool
        rocketMegapoolManager.addValidator(address(megapool), megapool.getValidatorCount());
        megapool.newValidator(_bondAmount, _useExpressTicket, _validatorPubkey, _validatorSignature, _depositDataRoot);
        // Send node operator's bond to the deposit pool
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        rocketDepositPool.nodeDeposit{value: _value}(_bondAmount);
        // Attempt to assign 1 minipool/megapool
        rocketDepositPool.maybeAssignDeposits(1);
    }

    /// @notice Called by minipools during bond reduction to increase the amount of ETH the node operator has
    /// @param _nodeAddress The node operator's address to increase the ETH matched for
    /// @param _amount The amount to increase the ETH matched
    /// @dev Will revert if the new ETH matched amount exceeds the node operators limit
    ///      Deprecated. Exists only for transition period to megapools
    function increaseEthMatched(address _nodeAddress, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) onlyLatestNetworkContract() {
        // Check amount doesn't exceed limits
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        uint256 ethMatched = rocketNodeStaking.getNodeETHMatched(_nodeAddress) + _amount;
        require(
            ethMatched <= rocketNodeStaking.getNodeETHMatchedLimit(_nodeAddress),
            "ETH matched after deposit exceeds limit based on node RPL stake"
        );
        // Push the change to snapshot manager
        bytes32 key = keccak256(abi.encodePacked("eth.matched.node.amount", _nodeAddress));
        rocketNetworkSnapshots.push(key, uint224(ethMatched));
    }

    /// @dev Increases the amount of ETH supplied by a node operator as bond
    function _increaseEthProvided(address _nodeAddress, uint256 _amount) private {
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        uint256 ethProvided = rocketNodeStaking.getNodeETHProvided(_nodeAddress) + _amount;
        bytes32 key = keccak256(abi.encodePacked("eth.provided.node.amount", _nodeAddress));
        rocketNetworkSnapshots.push(key, uint224(ethProvided));
    }

    /// @dev Initialises node's voting power if not already done
    function checkVotingInitialised() private {
        // Ensure voting has been initialised for this node
        RocketNetworkVotingInterface rocketNetworkVoting = RocketNetworkVotingInterface(getContractAddress("rocketNetworkVoting"));
        rocketNetworkVoting.initialiseVotingFor(msg.sender);
    }

    /// @dev Reverts if deposits are not enabled
    function checkDepositsEnabled() private {
        // Get contracts
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Check node settings
        require(rocketDAOProtocolSettingsNode.getDepositEnabled(), "Node deposits are currently disabled");
    }

    /// @notice Validates that a byte array has the expected length
    /// @param _data the byte array being validated
    /// @param _length the expected length
    function validateBytes(bytes memory _data, uint256 _length) pure internal {
        require(_data.length == _length, "Invalid bytes length");
    }
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity >0.5.0 <0.9.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);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

import "./IERC20.sol";

pragma solidity >0.5.0 <0.9.0;

interface IERC20Burnable is IERC20 {
    function burn(uint256 amount) external;
    function burnFrom(address account, uint256 amount) 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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only
import "./util/IERC20Burnable.sol";

interface RocketVaultInterface {
    function balanceOf(string memory _networkContractName) external view returns (uint256);
    function depositEther() external payable;
    function withdrawEther(uint256 _amount) external;
    function depositToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external;
    function withdrawToken(address _withdrawalAddress, IERC20 _tokenAddress, uint256 _amount) external;
    function balanceOfToken(string memory _networkContractName, IERC20 _tokenAddress) external view returns (uint256);
    function transferToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external;
    function burnToken(IERC20Burnable _tokenAddress, uint256 _amount) 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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketVaultWithdrawerInterface {
    function receiveVaultWithdrawalETH() external payable; 
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketDAOProtocolSettingsNodeInterface {
    function getRegistrationEnabled() external view returns (bool);
    function getSmoothingPoolRegistrationEnabled() external view returns (bool);
    function getDepositEnabled() external view returns (bool);
    function getVacantMinipoolsEnabled() external view returns (bool);
    function getMinimumPerMinipoolStake() external view returns (uint256);
    function getMaximumPerMinipoolStake() external view returns (uint256);
    function getMaximumStakeForVotingPower() external view returns (uint256);
    function getReducedBond() external view returns (uint256);
    function getBaseBondArray() external view returns (uint256[] memory);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketDepositPoolInterface {
    function getBalance() external view returns (uint256);
    function getNodeBalance() external view returns (uint256);
    function getUserBalance() external view returns (int256);
    function getNodeCreditBalance(address _nodeAddress) external view returns (uint256);
    function getExcessBalance() external view returns (uint256);
    function deposit() external payable;
    function getMaximumDepositAmount() external view returns (uint256);
    function nodeDeposit(uint256 _totalAmount) external payable;
    function recycleDissolvedDeposit() external payable;
    function recycleExcessCollateral() external payable;
    function recycleLiquidatedStake() external payable;
    function maybeAssignDeposits(uint256 _max) external;
    function assignDeposits(uint256 _max) external;
    function withdrawExcessBalance(uint256 _amount) external;
    function requestFunds(uint256 _bondAmount, uint32 _validatorId, uint256 _amount, bool _useExpressTicket) external;
    function exitQueue(uint32 _validatorId, bool _expressQueue) external;
    function applyCredit(uint256 _amount) external;
    function withdrawCredit(uint256 _amount) external;
    function getQueueTop() external view returns (address receiver, bool assignmentPossible, uint256 headMovedBlock);
    function getQueueIndex() external view returns (uint256);
    function getMinipoolQueueLength() external view returns (uint256);
    function getExpressQueueLength() external view returns (uint256);
    function getStandardQueueLength() external view returns (uint256);
    function getTotalQueueLength() 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;

interface RocketMegapoolFactoryInterface {
    function initialise() external;
    function getExpectedAddress(address _nodeAddress) external view returns (address);
    function getMegapoolDeployed(address _nodeAddress) external view returns (bool);
    function deployContract(address _nodeAddress) external returns (address);
    function getOrDeployContract(address _nodeAddress) external  returns (address);
    function upgradeDelegate(address _newDelegateAddress) external;
    function getDelegateExpiry(address _delegateAddress) 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;

struct Withdrawal {
    uint64 index;
    uint64 validatorIndex;
    bytes20 withdrawalCredentials;
    uint64 amountInGwei;
}

struct ValidatorProof {
    uint64 slot;
    uint64 validatorIndex;
    bytes pubkey;
    bytes32 withdrawalCredentials;
    bytes32[] witnesses;
}

interface BeaconStateVerifierInterface {
    function verifyValidator(ValidatorProof calldata _proof) external view returns(bool);
    function verifyExit(uint256 _validatorIndex, uint256 _withdrawableEpoch, uint64 _slot, bytes32[] calldata _proof) external view returns(bool);
    function verifyWithdrawal(uint256 _validatorIndex, uint64 _withdrawalSlot, uint256 _withdrawalNum, Withdrawal calldata _withdrawal, uint64 _slot, bytes32[] calldata _proof) external view returns(bool);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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 getExpirationBlock() external view returns (uint256);
}

File 12 of 22 : 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.18;

import "../../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 {
        bytes pubKey;   // Pubkey of this validator

        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

        uint64 validatorIndex;      // Index of the validator on the beaconchain
        uint64 exitBalance;         // Final balance of the validator at withdrawable_epoch in gwei (amount returned to EL)
        uint64 withdrawableEpoch;   // The epoch this validator is withdrawable
    }

    // Extra data temporarily stored for prestake operation
    struct PrestakeData {
        bytes _signature;
    }

    //
    // Delegate state
    //

    bool internal storageState;           // Used to prevent direct calls to the delegate contract
    uint256 internal expirationBlock;     // Used to store the expiry block 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 nodeRewards;     // Unclaimed ETH rewards for the owner

    uint256 internal nodeBond;        // Total value of bond supplied by node operator
    uint256 internal userCapital;     // Value of capital on the beacon chain supplied by the DP

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

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

    mapping(uint32 => ValidatorInfo) internal validators;
    mapping(uint32 => PrestakeData) internal prestakeData;

    uint32 internal numExitingValidators;       // Number of validators currently exiting
    uint64 internal soonestWithdrawableEpoch;   // The soonest epoch which a validator will become withdrawable

    mapping(uint256 => uint256) internal penalties;

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

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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-onl1000000000y
pragma solidity >0.5.0 <0.9.0;

import "../util/BeaconStateVerifierInterface.sol";
import {RocketMegapoolDelegateBaseInterface} from "./RocketMegapoolDelegateBaseInterface.sol";
import {RocketMegapoolStorageLayout} from "../../contract/megapool/RocketMegapoolStorageLayout.sol";

interface RocketMegapoolDelegateInterface is RocketMegapoolDelegateBaseInterface {
    struct StateProof {
        bytes data;
    }

    function newValidator(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external;
    function dequeue(uint32 _validatorId) external;
    function reduceBond(uint256 _amount) external;
    function assignFunds(uint32 _validatorId) external payable;
    function stake(uint32 _validatorId, ValidatorProof calldata _proof) external;
    function dissolveValidator(uint32 _validatorId) external;
    function getNodeAddress() external returns (address);
    function distribute() external;
    function claim() external;
    function repayDebt() external payable;

    function notifyExit(uint32 _validatorId, uint64 _withdrawableEpoch, uint64 _slot, bytes32[] calldata _proof) external;
    function notifyFinalBalance(uint32 _validatorId, uint64 _withdrawalSlot, uint256 _withdrawalNum, Withdrawal calldata _withdrawal, uint64 _slot, bytes32[] calldata _proof) external;
    function applyPenalty(uint256 _amount) external;

    function getValidatorCount() external view returns (uint32);
    function getActiveValidatorCount() external view returns (uint32);
    function getExitingValidatorCount() external view returns (uint32);
    function getSoonestWithdrawableEpoch() external view returns (uint64);
    function getValidatorInfo(uint32 _validatorId) external view returns (RocketMegapoolStorageLayout.ValidatorInfo memory);
    function getAssignedValue() external view returns (uint256);
    function getDebt() external view returns (uint256);
    function getRefundValue() external view returns (uint256);
    function getNodeBond() external view returns (uint256);
    function getUserCapital() external view returns (uint256);
    function calculatePendingRewards() external view returns (uint256 nodeRewards, uint256 voterRewards, uint256 rethRewards);
    function calculateRewards(uint256 _amount) external view returns (uint256 nodeRewards, uint256 voterRewards, uint256 rethRewards);
    function getPendingRewards() external view returns (uint256);
    function getLastDistributionBlock() external view returns (uint256);

    function getWithdrawalCredentials() external view returns (bytes32);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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);
}

File 15 of 22 : RocketMegapoolInterface.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.5.0 <0.9.0;

import {RocketMegapoolDelegateInterface} from "./RocketMegapoolDelegateInterface.sol";
import {RocketMegapoolProxyInterface} from "./RocketMegapoolProxyInterface.sol";

interface RocketMegapoolInterface is RocketMegapoolDelegateInterface, RocketMegapoolProxyInterface {
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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 "../../contract/megapool/RocketMegapoolStorageLayout.sol";

interface RocketMegapoolManagerInterface {
    function getValidatorCount() external view returns (uint256);
    function addValidator(address _megapoolAddress, uint32 _validatorId) external;
    function getValidatorInfo(uint256 _index) external view returns (RocketMegapoolStorageLayout.ValidatorInfo memory validatorInfo, address megapool, uint32 validatorId);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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;

struct Checkpoint224 {
    uint32 _block;
    uint224 _value;
}

/// @notice Accounting for snapshotting of values based on block numbers
interface RocketNetworkSnapshotsInterface {
    function push(bytes32 _key, uint224 _value) external;
    function length(bytes32 _key) external view returns (uint256);
    function latest(bytes32 _key) external view returns (bool, uint32, uint224);
    function latestBlock(bytes32 _key) external view returns (uint32);
    function latestValue(bytes32 _key) external view returns (uint224);
    function lookup(bytes32 _key, uint32 _block) external view returns (uint224);
    function lookupCheckpoint(bytes32 _key, uint32 _block) external view returns (bool, uint32, uint224);
    function lookupRecent(bytes32 _key, uint32 _block, uint256 _recency) external view returns (uint224);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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 RocketNetworkVotingInterface {
    function initialiseVotingFor(address _nodeAddress) external;
    function initialiseVoting() external;
    function initialiseVotingWithDelegate(address _delegate) external;
    function getVotingInitialised(address _nodeAddress) external view returns (bool);
    function getNodeCount(uint32 _block) external view returns (uint256);
    function getVotingPower(address _nodeAddress, uint32 _block) external view returns (uint256);
    function setDelegate(address _newDelegate) external;
    function getDelegate(address _nodeAddress, uint32 _block) external view returns (address);
    function getCurrentDelegate(address _nodeAddress) external view returns (address);
}

File 19 of 22 : MinipoolDeposit.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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

// Represents the type of deposits required by a minipool

enum MinipoolDeposit {
    None,       // Marks an invalid deposit type
    Full,       // The minipool requires 32 ETH from the node operator, 16 ETH of which will be refinanced from user deposits
    Half,       // The minipool required 16 ETH from the node operator to be matched with 16 ETH from user deposits
    Empty,      // The minipool requires 0 ETH from the node operator to be matched with 32 ETH from user deposits (trusted nodes only)
    Variable    // Indicates this minipool is of the new generation that supports a variable deposit amount
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

import "../../types/MinipoolDeposit.sol";

interface RocketNodeDepositInterface {
    function getBondRequirement(uint256 _numValidators) external view returns (uint256);
    function getNodeDepositCredit(address _nodeAddress) external view returns (uint256);
    function getNodeEthBalance(address _nodeAddress) external view returns (uint256);
    function getNodeCreditAndBalance(address _nodeAddress) external view returns (uint256);
    function getNodeUsableCreditAndBalance(address _nodeAddress) external view returns (uint256);
    function getNodeUsableCredit(address _nodeAddress) external view returns (uint256);
    function increaseDepositCreditBalance(address _nodeOperator, uint256 _amount) external;
    function depositEthFor(address _nodeAddress) external payable;
    function withdrawEth(address _nodeAddress, uint256 _amount) external;
    function deposit(uint256 _depositAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function depositWithCredit(uint256 _depositAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function increaseEthMatched(address _nodeAddress, uint256 _amount) 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;

interface RocketNodeStakingInterface {
    function getTotalRPLStake() external view returns (uint256);
    function getNodeRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeETHMatched(address _nodeAddress) external view returns (uint256);
    function getNodeETHProvided(address _nodeAddress) external view returns (uint256);
    function getNodeETHCollateralisationRatio(address _nodeAddress) external view returns (uint256);
    function getNodeRPLStakedTime(address _nodeAddress) external view returns (uint256);
    function getNodeEffectiveRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMinimumRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMaximumRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeETHMatchedLimit(address _nodeAddress) external view returns (uint256);
    function getRPLLockingAllowed(address _nodeAddress) external view returns (bool);
    function stakeRPL(uint256 _amount) external;
    function stakeRPLFor(address _nodeAddress, uint256 _amount) external;
    function setRPLLockingAllowed(address _nodeAddress, bool _allowed) external;
    function setStakeRPLForAllowed(address _caller, bool _allowed) external;
    function setStakeRPLForAllowed(address _nodeAddress, address _caller, bool _allowed) external;
    function getNodeRPLLocked(address _nodeAddress) external view returns (uint256);
    function lockRPL(address _nodeAddress, uint256 _amount) external;
    function unlockRPL(address _nodeAddress, uint256 _amount) external;
    function transferRPL(address _from, address _to, uint256 _amount) external;
    function burnRPL(address _from, uint256 _amount) external;
    function withdrawRPL(uint256 _amount) external;
    function withdrawRPL(address _nodeAddress, uint256 _amount) external;
    function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) 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.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

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

/// @title Base settings / modifiers for each contract in Rocket Pool
/// @author David Rugendyke

abstract contract RocketBase {

    // Calculate using this as the base
    uint256 constant calcBase = 1 ether;

    // Version of the contract
    uint8 public version;

    // The main storage contract where primary persistant storage is maintained
    RocketStorageInterface rocketStorage = RocketStorageInterface(address(0));


    /*** Modifiers **********************************************************/

    /**
    * @dev Throws if called by any sender that doesn't match a Rocket Pool network contract
    */
    modifier onlyLatestNetworkContract() {
        require(getBool(keccak256(abi.encodePacked("contract.exists", msg.sender))), "Invalid or outdated network contract");
        _;
    }

    /**
    * @dev Throws if called by any sender that doesn't match one of the supplied contract or is the latest version of that contract
    */
    modifier onlyLatestContract(string memory _contractName, address _contractAddress) {
        require(_contractAddress == getAddress(keccak256(abi.encodePacked("contract.address", _contractName))), "Invalid or outdated contract");
        _;
    }

    /**
    * @dev Throws if called by any sender that isn't a registered node
    */
    modifier onlyRegisteredNode(address _nodeAddress) {
        require(getBool(keccak256(abi.encodePacked("node.exists", _nodeAddress))), "Invalid node");
        _;
    }

    /**
    * @dev Throws if called by any sender that isn't a trusted node DAO member
    */
    modifier onlyTrustedNode(address _nodeAddress) {
        require(getBool(keccak256(abi.encodePacked("dao.trustednodes.", "member", _nodeAddress))), "Invalid trusted node");
        _;
    }

    /**
    * @dev Throws if called by any sender that isn't a registered minipool
    */
    modifier onlyRegisteredMinipool(address _minipoolAddress) {
        require(getBool(keccak256(abi.encodePacked("minipool.exists", _minipoolAddress))), "Invalid minipool");
        _;
    }

    /**
    * @dev Throws if called by any sender that isn't a registered megapool
    */
    modifier onlyRegisteredMegapool(address _megapoolAddress) {
        require(getBool(keccak256(abi.encodePacked("megapool.exists", _megapoolAddress))), "Invalid megapool");
        _;
    }

    /**
    * @dev Throws if called by any sender that isn't a registered minipool or megapool
    */
    modifier onlyRegisteredMinipoolOrMegapool(address _caller) {
        require(
            getBool(keccak256(abi.encodePacked("megapool.exists", _caller))) ||
            getBool(keccak256(abi.encodePacked("minipool.exists", _caller)))
        , "Invalid caller");
        _;
    }

    /**
    * @dev Throws if called by any account other than a guardian account (temporary account allowed access to settings before DAO is fully enabled)
    */
    modifier onlyGuardian() {
        require(msg.sender == rocketStorage.getGuardian(), "Account is not a temporary guardian");
        _;
    }




    /*** Methods **********************************************************/

    /// @dev Set the main Rocket Storage address
    constructor(RocketStorageInterface _rocketStorageAddress) {
        // Update the contract address
        rocketStorage = RocketStorageInterface(_rocketStorageAddress);
    }


    /// @dev Get the address of a network contract by name
    function getContractAddress(string memory _contractName) internal view returns (address) {
        // Get the current contract address
        address contractAddress = getAddress(keccak256(abi.encodePacked("contract.address", _contractName)));
        // Check it
        require(contractAddress != address(0x0), "Contract not found");
        // Return
        return contractAddress;
    }


    /// @dev Get the address of a network contract by name (returns address(0x0) instead of reverting if contract does not exist)
    function getContractAddressUnsafe(string memory _contractName) internal view returns (address) {
        // Get the current contract address
        address contractAddress = getAddress(keccak256(abi.encodePacked("contract.address", _contractName)));
        // Return
        return contractAddress;
    }


    /// @dev Get the name of a network contract by address
    function getContractName(address _contractAddress) internal view returns (string memory) {
        // Get the contract name
        string memory contractName = getString(keccak256(abi.encodePacked("contract.name", _contractAddress)));
        // Check it
        require(bytes(contractName).length > 0, "Contract not found");
        // Return
        return contractName;
    }

    /// @dev Get revert error message from a .call method
    function getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {
        // If the _res length is less than 68, then the transaction failed silently (without a revert message)
        if (_returnData.length < 68) return "Transaction reverted silently";
        assembly {
            // Slice the sighash.
            _returnData := add(_returnData, 0x04)
        }
        return abi.decode(_returnData, (string)); // All that remains is the revert string
    }



    /*** Rocket Storage Methods ****************************************/

    // Note: Unused helpers have been removed to keep contract sizes down

    /// @dev Storage get methods
    function getAddress(bytes32 _key) internal view returns (address) { return rocketStorage.getAddress(_key); }
    function getUint(bytes32 _key) internal view returns (uint) { return rocketStorage.getUint(_key); }
    function getString(bytes32 _key) internal view returns (string memory) { return rocketStorage.getString(_key); }
    function getBytes(bytes32 _key) internal view returns (bytes memory) { return rocketStorage.getBytes(_key); }
    function getBool(bytes32 _key) internal view returns (bool) { return rocketStorage.getBool(_key); }
    function getInt(bytes32 _key) internal view returns (int) { return rocketStorage.getInt(_key); }
    function getBytes32(bytes32 _key) internal view returns (bytes32) { return rocketStorage.getBytes32(_key); }

    /// @dev Storage set methods
    function setAddress(bytes32 _key, address _value) internal { rocketStorage.setAddress(_key, _value); }
    function setUint(bytes32 _key, uint _value) internal { rocketStorage.setUint(_key, _value); }
    function setString(bytes32 _key, string memory _value) internal { rocketStorage.setString(_key, _value); }
    function setBytes(bytes32 _key, bytes memory _value) internal { rocketStorage.setBytes(_key, _value); }
    function setBool(bytes32 _key, bool _value) internal { rocketStorage.setBool(_key, _value); }
    function setInt(bytes32 _key, int _value) internal { rocketStorage.setInt(_key, _value); }
    function setBytes32(bytes32 _key, bytes32 _value) internal { rocketStorage.setBytes32(_key, _value); }

    /// @dev Storage delete methods
    function deleteAddress(bytes32 _key) internal { rocketStorage.deleteAddress(_key); }
    function deleteUint(bytes32 _key) internal { rocketStorage.deleteUint(_key); }
    function deleteString(bytes32 _key) internal { rocketStorage.deleteString(_key); }
    function deleteBytes(bytes32 _key) internal { rocketStorage.deleteBytes(_key); }
    function deleteBool(bytes32 _key) internal { rocketStorage.deleteBool(_key); }
    function deleteInt(bytes32 _key) internal { rocketStorage.deleteInt(_key); }
    function deleteBytes32(bytes32 _key) internal { rocketStorage.deleteBytes32(_key); }

    /// @dev Storage arithmetic methods
    function addUint(bytes32 _key, uint256 _amount) internal { rocketStorage.addUint(_key, _amount); }
    function subUint(bytes32 _key, uint256 _amount) internal { rocketStorage.subUint(_key, _amount); }
}

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

Contract ABI

API
[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nodeAddress","type":"address"},{"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":"DepositFor","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":"DepositReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nodeAddress","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"bool","name":"_useExpressTicket","type":"bool"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"depositEthFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"bool","name":"_useExpressTicket","type":"bool"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"}],"name":"depositWithCredit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numValidators","type":"uint256"}],"name":"getBondRequirement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeCreditAndBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeOperator","type":"address"}],"name":"getNodeDepositCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeEthBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeUsableCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeUsableCreditAndBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeOperator","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseDepositCreditBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseEthMatched","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiveVaultWithdrawalETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60803461008557601f61263838819003918201601f19168301916001600160401b0383118484101761008a5780849260209460405283398101031261008557516001600160a01b038116810361008557600080546001600160a81b03191660089290921b610100600160a81b031691909117600517905560405161259790816100a18239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260048036101561009b575b50361561001c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff6100916100999261004061147d565b90516100898161007b60208201947f636f6e74726163742e6164647265737300000000000000000000000000000000865260308301906114b6565b03601f19810183528261143e565b519020611572565b1633146114e1565b005b600090813560e01c80631b9a91a414610e84578063206b427114610e575780632cb4730614610d0b5780633ee36db414610cd2578063493c946714610cac57806354fd4d5014610c8c578063643ff9fe14610aef5780636637714e14610ac95780639408290614610aa3578063aa5c9374146106bb578063c095415d146106ac578063dd2a624414610681578063e75574d6146103695763eee3f07a146101425750610010565b82602060031936011261036557610157611312565b91610160611c37565b91848151926101dd8461019e60208201977f636f6e74726163742e6164647265737300000000000000000000000000000000895260308301906114b6565b03946101b2601f199687810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff978892519020611572565b1630146114e1565b61024d61024884516020810190610240816102348c856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b0389810183528261143e565b519020611d12565b611e28565b8461025e610259611e8d565b61198a565b16803b156103655782908451928380927f98ea5fca00000000000000000000000000000000000000000000000000000000825234905af1801561035b57610343575b505061032f7f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1928251906103256020830191836103198a856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b0390810184528361143e565b3491519020611d9e565b80519234845242602085015233941692a380f35b61034c906113c3565b6103575784866102a0565b8480fd5b83513d84823e3d90fd5b8280fd5b50827f636f6e74726163742e61646472657373000000000000000000000000000000009161039636611363565b969095976103c46103fb6103ae979497969596611c37565b8351928391602083019e8f5260308301906114b6565b03916103d8601f199384810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff9d8e92519020611572565b61045e610248835160208101906102408161045233856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b0386810183528261143e565b8b9261046a348c611636565b9b61047433611b86565b8d61048761048133611b31565b836116b5565b1061062457908e92918e80821061060d575b505085610536575b505050908a6104bd93926104c39c6104c6575b505050346116b5565b96611f91565b80f35b61052e925161052660208201928261051a33866bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b0390810183528261143e565b519020611ec6565b8b80806104b4565b61058b86865160208101906105268161023433856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b610596610259611e8d565b1690813b1561036557856024849283885195869485937f3bed33ce0000000000000000000000000000000000000000000000000000000085528401525af18015610603576105e5575b806104a1565b6105f290949392946113c3565b6105ff5790918b8d6105df565b8b80fd5b84513d84823e3d90fd5b61061b929f50819750611636565b949c8f80610499565b60648360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601360248201527f496e73756666696369656e7420637265646974000000000000000000000000006044820152fd5b509190346106a95760206003193601126106a957506106a2602092356116c2565b9051908152f35b80fd5b82806003193601126106a95780f35b5034610a9f5782600319360112610a9f576106d4611312565b926106dd611c37565b918151946107ae6107a9602097610759816107228b8201997f636f6e74726163742e61646472657373000000000000000000000000000000008b5260308301906114b6565b0391610736601f199384810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff998a92519020611572565b85516102408a8201928261051a33866bffffffffffffffffffffffff196023927f636f6e74726163742e6578697374730000000000000000000000000000000000835260601b16600f8201520190565b611c70565b836107eb84516107bd81611422565b601181527f726f636b65744e6f64655374616b696e670000000000000000000000000000008982015261198a565b16908461082a85516107fc81611422565b601681527f726f636b65744e6574776f726b536e617073686f7473000000000000000000008a82015261198a565b16918451957fa493e6a200000000000000000000000000000000000000000000000000000000875282169586858201528881602481855afa908115610a95579089918991610a64575b5061088190602435906116b5565b9660248751809481937f48aeedf5000000000000000000000000000000000000000000000000000000008352898301525afa908115610a5a578791610a28575b5085116109a65785966bffffffffffffffffffffffff198551918201927f6574682e6d6174636865642e6e6f64652e616d6f756e74000000000000000000845260601b166037820152602b815261091781611406565b51902090803b156109a2578592836044927bffffffffffffffffffffffffffffffffffffffffffffffffffffffff875198899687957f5ba596490000000000000000000000000000000000000000000000000000000087528601521660248401525af190811561099957506109895750f35b610992906113c3565b6106a95780f35b513d84823e3d90fd5b8580fd5b608483888651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152603f60248201527f455448206d617463686564206166746572206465706f7369742065786365656460448201527f73206c696d6974206261736564206f6e206e6f64652052504c207374616b65006064820152fd5b90508781813d8311610a53575b610a3f818361143e565b81010312610a4e5751386108c1565b600080fd5b503d610a35565b85513d89823e3d90fd5b82819392503d8311610a8e575b610a7b818361143e565b81010312610a4e57518890610881610873565b503d610a71565b86513d8a823e3d90fd5b5080fd5b828434610a9f576020600319360112610a9f576020906106a2610ac4611312565b611b86565b828434610a9f576020600319360112610a9f576020906106a2610aea611312565b611b31565b828434610a9f5780600319360112610a9f576104c390610b0d611312565b610c21610b18611c37565b92610b8173ffffffffffffffffffffffffffffffffffffffff6101d583519687610b6d60208201927f636f6e74726163742e6164647265737300000000000000000000000000000000845260308301906114b6565b0397610089601f19998a810183528261143e565b610bc4815160208101907f6d696e69706f6f6c2e657869737473000000000000000000000000000000000082523360601b602f8201526023815261024081611406565b8015610c2d575b610bd490611c70565b5192836103196020820194856bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b60243591519020611d9e565b50610bd4610c85825160208101906102408161023433856bffffffffffffffffffffffff196023927f636f6e74726163742e6578697374730000000000000000000000000000000000835260601b16600f8201520190565b9050610bcb565b828434610a9f5781600319360112610a9f5760ff60209254169051908152f35b828434610a9f576020600319360112610a9f576020906106a2610ccd611312565b611a47565b828434610a9f576020600319360112610a9f576020906106a2610cf3611312565b610d05610cff82611b86565b91611b31565b906116b5565b50610d1536611363565b9596610de56102488b610d9473ffffffffffffffffffffffffffffffffffffffff6101d5610d479b979b9a989a611c37565b93519384610d8060208201927f636f6e74726163742e6164647265737300000000000000000000000000000000845260308301906114b6565b0394610089601f199687810183528261143e565b8c5161024060208201928261051a33866bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b873403610dfa57506104c39798503496611f91565b60649060208b51917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600d60248201527f496e76616c69642076616c7565000000000000000000000000000000000000006044820152fd5b828434610a9f576020600319360112610a9f576020906106a2610e78611312565b610d05610cff82611a47565b50829034610365578160031936011261036557610e9f611312565b91602491823590610eae611c37565b90835194602092610f2487610eed868201937f636f6e74726163742e6164647265737300000000000000000000000000000000855260308301906114b6565b0397610f01601f19998a810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff938492519020611572565b610f8661024889885161024081610f7a8a820194856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b038c810183528261143e565b80895460081c16908651917f5b49ff62000000000000000000000000000000000000000000000000000000008352818a1698898685015286848681855afa938415611308578c946112d9575b508284169a8b330361125857610fe781611b31565b918983106111fd57898e939261051a611049611052948f8e9051938491820195866bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b51902092611636565b90833b1561036557604490838c5195869485937fe2a4853a0000000000000000000000000000000000000000000000000000000085528c8501528a8401525af180156111f3576111de575b509089916110ac610259611e8d565b16803b1561036557828091858a51809481937f3bed33ce0000000000000000000000000000000000000000000000000000000083528c8b8401525af180156111d45791839188936111bc575b50819282915af13d156111b7573d61110f81611461565b9061111c8851928361143e565b815289853d92013e5b1561115d575050825191825242908201527f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe19190a380f35b6016906064938651937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f4661696c656420746f20776974686472617720455448000000000000000000006044820152fd5b611125565b6111c79193506113c3565b610a9f578186918c6110f8565b88513d85823e3d90fd5b6111eb909a91929a6113c3565b98908a61109d565b88513d8d823e3d90fd5b6064886014898c8f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152fd5b6084876028888b8e51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f4f6e6c79207769746864726177616c20616464726573732063616e207769746860448201527f64726177204554480000000000000000000000000000000000000000000000006064820152fd5b6112fa919450873d8911611301575b6112f2818361143e565b810190611546565b928c610fd2565b503d6112e8565b89513d8e823e3d90fd5b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610a4e57565b9181601f84011215610a4e5782359167ffffffffffffffff8311610a4e5760208381860195010111610a4e57565b60a0600319820112610a4e57600435916024358015158103610a4e579167ffffffffffffffff91604435838111610a4e57826113a191600401611335565b93909392606435918211610a4e576113bb91600401611335565b909160843590565b67ffffffffffffffff81116113d757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176113d757604052565b6040810190811067ffffffffffffffff8211176113d757604052565b90601f601f19910116810190811067ffffffffffffffff8211176113d757604052565b67ffffffffffffffff81116113d757601f01601f191660200190565b6040519061148a82611422565b601182527f726f636b65744465706f736974506f6f6c0000000000000000000000000000006020830152565b9081519160005b8381106114ce575050016000815290565b80602080928401015181850152016114bd565b156114e857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e7472616374000000006044820152fd5b90816020910312610a4e575173ffffffffffffffffffffffffffffffffffffffff81168103610a4e5790565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f21f8a72100000000000000000000000000000000000000000000000000000000835260048301525afa9081156115f1576000916115d6575090565b6115ee915060203d8111611301576112f2818361143e565b90565b6040513d6000823e3d90fd5b6040519061160a82611422565b601d82527f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000006020830152565b9190820391821161164357565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80518210156116865760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190820180921161164357565b80156119845773ffffffffffffffffffffffffffffffffffffffff6116e86102596115fd565b16916040517f1dd9a0c1000000000000000000000000000000000000000000000000000000008152600060049381838681895afa9283156119795782936118b6575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80820182811161188a5784518110611876575060208697604097969751968780927f4c9b75d60000000000000000000000000000000000000000000000000000000082525afa94851561186b578395611838575b50835190810190811161180c57906117bb6117c49285611672565b51935190611636565b8381029381850414901517156117e057506115ee9293506116b5565b806011867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b6024836011897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b9094506020813d8211611863575b816118536020938361143e565b81010312610365575193386117a0565b3d9150611846565b6040513d85823e3d90fd5b9496505050506118869250611672565b5190565b6024846011897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b9092503d8083833e6118c8818361143e565b8101602090818382031261197557825167ffffffffffffffff938482116109a2570181601f82011215610357578051938411611949578360051b90604051946119138584018761143e565b855283808601928201019283116109a2578301905b82821061193a5750505050913861172a565b81518152908301908301611928565b60248560418a7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8380fd5b6040513d84823e3d90fd5b50600090565b6119ca906040516100898161007b60208201947f636f6e74726163742e6164647265737300000000000000000000000000000000865260308301906114b6565b73ffffffffffffffffffffffffffffffffffffffff8116156119e95790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e6400000000000000000000000000006044820152fd5b6115ee90604051611a9c8161007b6020820194856bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b519020602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937fbd02d0f500000000000000000000000000000000000000000000000000000000835260048301525afa9081156115f157600091611b03575090565b906020823d8211611b29575b81611b1c6020938361143e565b810103126106a957505190565b3d9150611b0f565b6115ee90604051611a9c8161007b6020820194856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b600490602073ffffffffffffffffffffffffffffffffffffffff611bab61025961147d565b16604051938480927f12065fe00000000000000000000000000000000000000000000000000000000082525afa9182156115f157600092611c02575b50611bf190611a47565b90808211611bfd575090565b905090565b90916020823d8211611c2f575b81611c1c6020938361143e565b810103126106a957505190611bf1611be7565b3d9150611c0f565b60405190611c4482611422565b601182527f726f636b65744e6f64654465706f7369740000000000000000000000000000006020830152565b15611c7757565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f72616374000000000000000000000000000000000000000000000000000000006064820152fd5b90816020910312610a4e57518015158103610a4e5790565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f7ae1cfca00000000000000000000000000000000000000000000000000000000835260048301525afa9081156115f157600091611d76575090565b6115ee915060203d8111611d97575b611d8f818361143e565b810190611cfa565b503d611d85565b9060009073ffffffffffffffffffffffffffffffffffffffff825460081c1692833b156103655790604483928360405196879485937fadb353dc000000000000000000000000000000000000000000000000000000008552600485015260248401525af1908115611e1c5750611e115750565b611e1a906113c3565b565b604051903d90823e3d90fd5b15611e2f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152fd5b60405190611e9a82611422565b600b82527f726f636b65745661756c740000000000000000000000000000000000000000006020830152565b9060009073ffffffffffffffffffffffffffffffffffffffff825460081c1692833b156103655790604483928360405196879485937febb9d8c9000000000000000000000000000000000000000000000000000000008552600485015260248401525af1908115611e1c5750611e115750565b929192611f4582611461565b91611f53604051938461143e565b829481845281830111610a4e578281602093846000960137010152565b601f8260209493601f19938186528686013760008582860101520116010190565b94969395969290926030611fa6368486611f39565b5103612503576060611fb936838a611f39565b51036125035761201e93600098604098895193611fd585611422565b601385526020947f726f636b65744e6574776f726b566f74696e67000000000000000000000000008682015273ffffffffffffffffffffffffffffffffffffffff98899161198a565b16803b156124ff578c809160248e51809481937fbdbc6d420000000000000000000000000000000000000000000000000000000083523360048401525af180156123db576124ec575b50600485896120776102596115fd565b168d51928380927f6ada78470000000000000000000000000000000000000000000000000000000082525afa9081156123db578d916124cf575b501561244d578a5189815242868201527f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f8886318c3392a28b858c60248b61212883516120fa81611422565b601581527f726f636b65744d656761706f6f6c466163746f727900000000000000000000008682015261198a565b169151809481937f959a26f20000000000000000000000000000000000000000000000000000000083523360048401525af19081156123db579089918e91612430575b501694886121ab8d5161217d81611422565b601581527f726f636b65744d656761706f6f6c4d616e6167657200000000000000000000008482015261198a565b16908c517f7071688a00000000000000000000000000000000000000000000000000000000815281816004818b5afa918215612424578f926123e9575b5050813b156123e55763ffffffff60448f928f84905195869485937f5756fd5b0000000000000000000000000000000000000000000000000000000085528d60048601521660248401525af180156123db57908d916123c7575b5050843b156105ff578b959493926122b587938c936122a38f519b8c9a8b998a987f94a67ef9000000000000000000000000000000000000000000000000000000008a5260048a01521515602489015260a0604489015260a4880191611f70565b91600319868403016064870152611f70565b90608483015203925af180156123bd579086916123a9575b50506122da61025961147d565b1691823b1561035757849060248551809481937f22b1751d0000000000000000000000000000000000000000000000000000000083526004830152865af1801561239c57908491612388575b5050803b15610365579082809260248351809581937fa673c8e1000000000000000000000000000000000000000000000000000000008352600160048401525af19081156109995750612377575050565b61238182916113c3565b6106a95750565b612391906113c3565b610365578238612326565b50505051903d90823e3d90fd5b6123b2906113c3565b6103575784386122cd565b85513d88823e3d90fd5b6123d0906113c3565b6105ff578b38612242565b8c513d8f823e3d90fd5b8d80fd5b90809250813d831161241d575b612400818361143e565b810103126123e5575163ffffffff811681036123e55738806121e8565b503d6123f6565b8f8f51903d90823e3d90fd5b6124479150873d8911611301576112f2818361143e565b3861216b565b6084858c51907f08c379a000000000000000000000000000000000000000000000000000000000825260048201526024808201527f4e6f6465206465706f73697473206172652063757272656e746c79206469736160448201527f626c6564000000000000000000000000000000000000000000000000000000006064820152fd5b6124e69150863d8811611d9757611d8f818361143e565b386120b1565b6124f8909c919c6113c3565b9a38612067565b8c80fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e76616c6964206279746573206c656e6774680000000000000000000000006044820152fdfea2646970667358221220dfb5ed8fa62e4e922bd987b3d6cd3b601c026e3cd0be6081e28111e4d27193bf64736f6c634300081200330000000000000000000000008a7fb51dadf638058fbb3f7357c6b5dfbcd2687c

Deployed Bytecode

0x60406080815260048036101561009b575b50361561001c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff6100916100999261004061147d565b90516100898161007b60208201947f636f6e74726163742e6164647265737300000000000000000000000000000000865260308301906114b6565b03601f19810183528261143e565b519020611572565b1633146114e1565b005b600090813560e01c80631b9a91a414610e84578063206b427114610e575780632cb4730614610d0b5780633ee36db414610cd2578063493c946714610cac57806354fd4d5014610c8c578063643ff9fe14610aef5780636637714e14610ac95780639408290614610aa3578063aa5c9374146106bb578063c095415d146106ac578063dd2a624414610681578063e75574d6146103695763eee3f07a146101425750610010565b82602060031936011261036557610157611312565b91610160611c37565b91848151926101dd8461019e60208201977f636f6e74726163742e6164647265737300000000000000000000000000000000895260308301906114b6565b03946101b2601f199687810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff978892519020611572565b1630146114e1565b61024d61024884516020810190610240816102348c856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b0389810183528261143e565b519020611d12565b611e28565b8461025e610259611e8d565b61198a565b16803b156103655782908451928380927f98ea5fca00000000000000000000000000000000000000000000000000000000825234905af1801561035b57610343575b505061032f7f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1928251906103256020830191836103198a856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b0390810184528361143e565b3491519020611d9e565b80519234845242602085015233941692a380f35b61034c906113c3565b6103575784866102a0565b8480fd5b83513d84823e3d90fd5b8280fd5b50827f636f6e74726163742e61646472657373000000000000000000000000000000009161039636611363565b969095976103c46103fb6103ae979497969596611c37565b8351928391602083019e8f5260308301906114b6565b03916103d8601f199384810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff9d8e92519020611572565b61045e610248835160208101906102408161045233856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b0386810183528261143e565b8b9261046a348c611636565b9b61047433611b86565b8d61048761048133611b31565b836116b5565b1061062457908e92918e80821061060d575b505085610536575b505050908a6104bd93926104c39c6104c6575b505050346116b5565b96611f91565b80f35b61052e925161052660208201928261051a33866bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b0390810183528261143e565b519020611ec6565b8b80806104b4565b61058b86865160208101906105268161023433856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b610596610259611e8d565b1690813b1561036557856024849283885195869485937f3bed33ce0000000000000000000000000000000000000000000000000000000085528401525af18015610603576105e5575b806104a1565b6105f290949392946113c3565b6105ff5790918b8d6105df565b8b80fd5b84513d84823e3d90fd5b61061b929f50819750611636565b949c8f80610499565b60648360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601360248201527f496e73756666696369656e7420637265646974000000000000000000000000006044820152fd5b509190346106a95760206003193601126106a957506106a2602092356116c2565b9051908152f35b80fd5b82806003193601126106a95780f35b5034610a9f5782600319360112610a9f576106d4611312565b926106dd611c37565b918151946107ae6107a9602097610759816107228b8201997f636f6e74726163742e61646472657373000000000000000000000000000000008b5260308301906114b6565b0391610736601f199384810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff998a92519020611572565b85516102408a8201928261051a33866bffffffffffffffffffffffff196023927f636f6e74726163742e6578697374730000000000000000000000000000000000835260601b16600f8201520190565b611c70565b836107eb84516107bd81611422565b601181527f726f636b65744e6f64655374616b696e670000000000000000000000000000008982015261198a565b16908461082a85516107fc81611422565b601681527f726f636b65744e6574776f726b536e617073686f7473000000000000000000008a82015261198a565b16918451957fa493e6a200000000000000000000000000000000000000000000000000000000875282169586858201528881602481855afa908115610a95579089918991610a64575b5061088190602435906116b5565b9660248751809481937f48aeedf5000000000000000000000000000000000000000000000000000000008352898301525afa908115610a5a578791610a28575b5085116109a65785966bffffffffffffffffffffffff198551918201927f6574682e6d6174636865642e6e6f64652e616d6f756e74000000000000000000845260601b166037820152602b815261091781611406565b51902090803b156109a2578592836044927bffffffffffffffffffffffffffffffffffffffffffffffffffffffff875198899687957f5ba596490000000000000000000000000000000000000000000000000000000087528601521660248401525af190811561099957506109895750f35b610992906113c3565b6106a95780f35b513d84823e3d90fd5b8580fd5b608483888651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152603f60248201527f455448206d617463686564206166746572206465706f7369742065786365656460448201527f73206c696d6974206261736564206f6e206e6f64652052504c207374616b65006064820152fd5b90508781813d8311610a53575b610a3f818361143e565b81010312610a4e5751386108c1565b600080fd5b503d610a35565b85513d89823e3d90fd5b82819392503d8311610a8e575b610a7b818361143e565b81010312610a4e57518890610881610873565b503d610a71565b86513d8a823e3d90fd5b5080fd5b828434610a9f576020600319360112610a9f576020906106a2610ac4611312565b611b86565b828434610a9f576020600319360112610a9f576020906106a2610aea611312565b611b31565b828434610a9f5780600319360112610a9f576104c390610b0d611312565b610c21610b18611c37565b92610b8173ffffffffffffffffffffffffffffffffffffffff6101d583519687610b6d60208201927f636f6e74726163742e6164647265737300000000000000000000000000000000845260308301906114b6565b0397610089601f19998a810183528261143e565b610bc4815160208101907f6d696e69706f6f6c2e657869737473000000000000000000000000000000000082523360601b602f8201526023815261024081611406565b8015610c2d575b610bd490611c70565b5192836103196020820194856bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b60243591519020611d9e565b50610bd4610c85825160208101906102408161023433856bffffffffffffffffffffffff196023927f636f6e74726163742e6578697374730000000000000000000000000000000000835260601b16600f8201520190565b9050610bcb565b828434610a9f5781600319360112610a9f5760ff60209254169051908152f35b828434610a9f576020600319360112610a9f576020906106a2610ccd611312565b611a47565b828434610a9f576020600319360112610a9f576020906106a2610cf3611312565b610d05610cff82611b86565b91611b31565b906116b5565b50610d1536611363565b9596610de56102488b610d9473ffffffffffffffffffffffffffffffffffffffff6101d5610d479b979b9a989a611c37565b93519384610d8060208201927f636f6e74726163742e6164647265737300000000000000000000000000000000845260308301906114b6565b0394610089601f199687810183528261143e565b8c5161024060208201928261051a33866bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b873403610dfa57506104c39798503496611f91565b60649060208b51917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600d60248201527f496e76616c69642076616c7565000000000000000000000000000000000000006044820152fd5b828434610a9f576020600319360112610a9f576020906106a2610e78611312565b610d05610cff82611a47565b50829034610365578160031936011261036557610e9f611312565b91602491823590610eae611c37565b90835194602092610f2487610eed868201937f636f6e74726163742e6164647265737300000000000000000000000000000000855260308301906114b6565b0397610f01601f19998a810183528261143e565b6101d573ffffffffffffffffffffffffffffffffffffffff938492519020611572565b610f8661024889885161024081610f7a8a820194856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b038c810183528261143e565b80895460081c16908651917f5b49ff62000000000000000000000000000000000000000000000000000000008352818a1698898685015286848681855afa938415611308578c946112d9575b508284169a8b330361125857610fe781611b31565b918983106111fd57898e939261051a611049611052948f8e9051938491820195866bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b51902092611636565b90833b1561036557604490838c5195869485937fe2a4853a0000000000000000000000000000000000000000000000000000000085528c8501528a8401525af180156111f3576111de575b509089916110ac610259611e8d565b16803b1561036557828091858a51809481937f3bed33ce0000000000000000000000000000000000000000000000000000000083528c8b8401525af180156111d45791839188936111bc575b50819282915af13d156111b7573d61110f81611461565b9061111c8851928361143e565b815289853d92013e5b1561115d575050825191825242908201527f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe19190a380f35b6016906064938651937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f4661696c656420746f20776974686472617720455448000000000000000000006044820152fd5b611125565b6111c79193506113c3565b610a9f578186918c6110f8565b88513d85823e3d90fd5b6111eb909a91929a6113c3565b98908a61109d565b88513d8d823e3d90fd5b6064886014898c8f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152fd5b6084876028888b8e51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f4f6e6c79207769746864726177616c20616464726573732063616e207769746860448201527f64726177204554480000000000000000000000000000000000000000000000006064820152fd5b6112fa919450873d8911611301575b6112f2818361143e565b810190611546565b928c610fd2565b503d6112e8565b89513d8e823e3d90fd5b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610a4e57565b9181601f84011215610a4e5782359167ffffffffffffffff8311610a4e5760208381860195010111610a4e57565b60a0600319820112610a4e57600435916024358015158103610a4e579167ffffffffffffffff91604435838111610a4e57826113a191600401611335565b93909392606435918211610a4e576113bb91600401611335565b909160843590565b67ffffffffffffffff81116113d757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176113d757604052565b6040810190811067ffffffffffffffff8211176113d757604052565b90601f601f19910116810190811067ffffffffffffffff8211176113d757604052565b67ffffffffffffffff81116113d757601f01601f191660200190565b6040519061148a82611422565b601182527f726f636b65744465706f736974506f6f6c0000000000000000000000000000006020830152565b9081519160005b8381106114ce575050016000815290565b80602080928401015181850152016114bd565b156114e857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e7472616374000000006044820152fd5b90816020910312610a4e575173ffffffffffffffffffffffffffffffffffffffff81168103610a4e5790565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f21f8a72100000000000000000000000000000000000000000000000000000000835260048301525afa9081156115f1576000916115d6575090565b6115ee915060203d8111611301576112f2818361143e565b90565b6040513d6000823e3d90fd5b6040519061160a82611422565b601d82527f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000006020830152565b9190820391821161164357565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80518210156116865760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190820180921161164357565b80156119845773ffffffffffffffffffffffffffffffffffffffff6116e86102596115fd565b16916040517f1dd9a0c1000000000000000000000000000000000000000000000000000000008152600060049381838681895afa9283156119795782936118b6575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80820182811161188a5784518110611876575060208697604097969751968780927f4c9b75d60000000000000000000000000000000000000000000000000000000082525afa94851561186b578395611838575b50835190810190811161180c57906117bb6117c49285611672565b51935190611636565b8381029381850414901517156117e057506115ee9293506116b5565b806011867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b6024836011897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b9094506020813d8211611863575b816118536020938361143e565b81010312610365575193386117a0565b3d9150611846565b6040513d85823e3d90fd5b9496505050506118869250611672565b5190565b6024846011897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b9092503d8083833e6118c8818361143e565b8101602090818382031261197557825167ffffffffffffffff938482116109a2570181601f82011215610357578051938411611949578360051b90604051946119138584018761143e565b855283808601928201019283116109a2578301905b82821061193a5750505050913861172a565b81518152908301908301611928565b60248560418a7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8380fd5b6040513d84823e3d90fd5b50600090565b6119ca906040516100898161007b60208201947f636f6e74726163742e6164647265737300000000000000000000000000000000865260308301906114b6565b73ffffffffffffffffffffffffffffffffffffffff8116156119e95790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e6400000000000000000000000000006044820152fd5b6115ee90604051611a9c8161007b6020820194856bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b519020602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937fbd02d0f500000000000000000000000000000000000000000000000000000000835260048301525afa9081156115f157600091611b03575090565b906020823d8211611b29575b81611b1c6020938361143e565b810103126106a957505190565b3d9150611b0f565b6115ee90604051611a9c8161007b6020820194856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b600490602073ffffffffffffffffffffffffffffffffffffffff611bab61025961147d565b16604051938480927f12065fe00000000000000000000000000000000000000000000000000000000082525afa9182156115f157600092611c02575b50611bf190611a47565b90808211611bfd575090565b905090565b90916020823d8211611c2f575b81611c1c6020938361143e565b810103126106a957505190611bf1611be7565b3d9150611c0f565b60405190611c4482611422565b601182527f726f636b65744e6f64654465706f7369740000000000000000000000000000006020830152565b15611c7757565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f72616374000000000000000000000000000000000000000000000000000000006064820152fd5b90816020910312610a4e57518015158103610a4e5790565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f7ae1cfca00000000000000000000000000000000000000000000000000000000835260048301525afa9081156115f157600091611d76575090565b6115ee915060203d8111611d97575b611d8f818361143e565b810190611cfa565b503d611d85565b9060009073ffffffffffffffffffffffffffffffffffffffff825460081c1692833b156103655790604483928360405196879485937fadb353dc000000000000000000000000000000000000000000000000000000008552600485015260248401525af1908115611e1c5750611e115750565b611e1a906113c3565b565b604051903d90823e3d90fd5b15611e2f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152fd5b60405190611e9a82611422565b600b82527f726f636b65745661756c740000000000000000000000000000000000000000006020830152565b9060009073ffffffffffffffffffffffffffffffffffffffff825460081c1692833b156103655790604483928360405196879485937febb9d8c9000000000000000000000000000000000000000000000000000000008552600485015260248401525af1908115611e1c5750611e115750565b929192611f4582611461565b91611f53604051938461143e565b829481845281830111610a4e578281602093846000960137010152565b601f8260209493601f19938186528686013760008582860101520116010190565b94969395969290926030611fa6368486611f39565b5103612503576060611fb936838a611f39565b51036125035761201e93600098604098895193611fd585611422565b601385526020947f726f636b65744e6574776f726b566f74696e67000000000000000000000000008682015273ffffffffffffffffffffffffffffffffffffffff98899161198a565b16803b156124ff578c809160248e51809481937fbdbc6d420000000000000000000000000000000000000000000000000000000083523360048401525af180156123db576124ec575b50600485896120776102596115fd565b168d51928380927f6ada78470000000000000000000000000000000000000000000000000000000082525afa9081156123db578d916124cf575b501561244d578a5189815242868201527f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f8886318c3392a28b858c60248b61212883516120fa81611422565b601581527f726f636b65744d656761706f6f6c466163746f727900000000000000000000008682015261198a565b169151809481937f959a26f20000000000000000000000000000000000000000000000000000000083523360048401525af19081156123db579089918e91612430575b501694886121ab8d5161217d81611422565b601581527f726f636b65744d656761706f6f6c4d616e6167657200000000000000000000008482015261198a565b16908c517f7071688a00000000000000000000000000000000000000000000000000000000815281816004818b5afa918215612424578f926123e9575b5050813b156123e55763ffffffff60448f928f84905195869485937f5756fd5b0000000000000000000000000000000000000000000000000000000085528d60048601521660248401525af180156123db57908d916123c7575b5050843b156105ff578b959493926122b587938c936122a38f519b8c9a8b998a987f94a67ef9000000000000000000000000000000000000000000000000000000008a5260048a01521515602489015260a0604489015260a4880191611f70565b91600319868403016064870152611f70565b90608483015203925af180156123bd579086916123a9575b50506122da61025961147d565b1691823b1561035757849060248551809481937f22b1751d0000000000000000000000000000000000000000000000000000000083526004830152865af1801561239c57908491612388575b5050803b15610365579082809260248351809581937fa673c8e1000000000000000000000000000000000000000000000000000000008352600160048401525af19081156109995750612377575050565b61238182916113c3565b6106a95750565b612391906113c3565b610365578238612326565b50505051903d90823e3d90fd5b6123b2906113c3565b6103575784386122cd565b85513d88823e3d90fd5b6123d0906113c3565b6105ff578b38612242565b8c513d8f823e3d90fd5b8d80fd5b90809250813d831161241d575b612400818361143e565b810103126123e5575163ffffffff811681036123e55738806121e8565b503d6123f6565b8f8f51903d90823e3d90fd5b6124479150873d8911611301576112f2818361143e565b3861216b565b6084858c51907f08c379a000000000000000000000000000000000000000000000000000000000825260048201526024808201527f4e6f6465206465706f73697473206172652063757272656e746c79206469736160448201527f626c6564000000000000000000000000000000000000000000000000000000006064820152fd5b6124e69150863d8811611d9757611d8f818361143e565b386120b1565b6124f8909c919c6113c3565b9a38612067565b8c80fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e76616c6964206279746573206c656e6774680000000000000000000000006044820152fdfea2646970667358221220dfb5ed8fa62e4e922bd987b3d6cd3b601c026e3cd0be6081e28111e4d27193bf64736f6c63430008120033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000008a7FB51dAdF638058fBB3f7357c6b5dFbCd2687C

-----Decoded View---------------
Arg [0] : _rocketStorageAddress (address): 0x8a7FB51dAdF638058fBB3f7357c6b5dFbCd2687C

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008a7FB51dAdF638058fBB3f7357c6b5dFbCd2687C


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
0x060fB8cB02F85171eEA1b219E97f6CF72ebEA7f7
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.