Holesky Testnet

Contract

0x7428d3A963aFff442246bfF6DF90e60d6E1Cda0E

Overview

ETH Balance

15 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Deposit Eth For6244202023-12-29 2:41:24291 days ago1703817684IN
0x7428d3A9...d6E1Cda0E
1 ETH0.000111551.5
Deposit Eth For6244122023-12-29 2:39:36291 days ago1703817576IN
0x7428d3A9...d6E1Cda0E
1 ETH0.000111551.5
Deposit Eth For6203942023-12-28 12:44:24292 days ago1703767464IN
0x7428d3A9...d6E1Cda0E
1 ETH0.00013721.5
Deposit4485702023-12-03 21:16:12317 days ago1701638172IN
0x7428d3A9...d6E1Cda0E
16 ETH0.002694562
Deposit Eth For4162952023-11-29 4:54:36321 days ago1701233676IN
0x7428d3A9...d6E1Cda0E
0.1 ETH0.000271412.5
Deposit4018932023-11-27 2:01:12323 days ago1701050472IN
0x7428d3A9...d6E1Cda0E
16 ETH0.002658872
Deposit With Cre...4018422023-11-27 1:50:12323 days ago1701049812IN
0x7428d3A9...d6E1Cda0E
0 ETH0.002744192
Deposit Eth For4018322023-11-27 1:48:00323 days ago1701049680IN
0x7428d3A9...d6E1Cda0E
8 ETH0.000271412.5
Withdraw Eth4018142023-11-27 1:44:00323 days ago1701049440IN
0x7428d3A9...d6E1Cda0E
0 ETH0.000192632.5
Deposit Eth For4017102023-11-27 1:21:48323 days ago1701048108IN
0x7428d3A9...d6E1Cda0E
0.1 ETH0.000271412.5
Deposit With Cre...3646562023-11-21 14:32:00329 days ago1700577120IN
0x7428d3A9...d6E1Cda0E
1 ETH0.002641812
Deposit Eth For3616932023-11-21 4:08:12329 days ago1700539692IN
0x7428d3A9...d6E1Cda0E
7 ETH00.00000015
Withdraw Eth3607942023-11-21 1:00:24329 days ago1700528424IN
0x7428d3A9...d6E1Cda0E
0 ETH0.000154142
0x608060403549582023-11-20 4:41:24330 days ago1700455284IN
 Create: RocketNodeDeposit
0 ETH0.007742812.5

Latest 20 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
6244202023-12-29 2:41:24291 days ago1703817684
0x7428d3A9...d6E1Cda0E
1 ETH
6244122023-12-29 2:39:36291 days ago1703817576
0x7428d3A9...d6E1Cda0E
1 ETH
6203942023-12-28 12:44:24292 days ago1703767464
0x7428d3A9...d6E1Cda0E
1 ETH
4485702023-12-03 21:16:12317 days ago1701638172
0x7428d3A9...d6E1Cda0E
1 ETH
4485702023-12-03 21:16:12317 days ago1701638172
0x7428d3A9...d6E1Cda0E
15 ETH
4162952023-11-29 4:54:36321 days ago1701233676
0x7428d3A9...d6E1Cda0E
0.1 ETH
4018932023-11-27 2:01:12323 days ago1701050472
0x7428d3A9...d6E1Cda0E
1 ETH
4018932023-11-27 2:01:12323 days ago1701050472
0x7428d3A9...d6E1Cda0E
15 ETH
4018422023-11-27 1:50:12323 days ago1701049812
0x7428d3A9...d6E1Cda0E
1 ETH
4018422023-11-27 1:50:12323 days ago1701049812
0x7428d3A9...d6E1Cda0E
1 ETH
4018422023-11-27 1:50:12323 days ago1701049812
0x7428d3A9...d6E1Cda0E
8 ETH
4018322023-11-27 1:48:00323 days ago1701049680
0x7428d3A9...d6E1Cda0E
8 ETH
4018142023-11-27 1:44:00323 days ago1701049440
0x7428d3A9...d6E1Cda0E
0.1 ETH
4018142023-11-27 1:44:00323 days ago1701049440
0x7428d3A9...d6E1Cda0E
0.1 ETH
4017102023-11-27 1:21:48323 days ago1701048108
0x7428d3A9...d6E1Cda0E
0.1 ETH
3646562023-11-21 14:32:00329 days ago1700577120
0x7428d3A9...d6E1Cda0E
1 ETH
3646562023-11-21 14:32:00329 days ago1700577120
0x7428d3A9...d6E1Cda0E
7 ETH
3616932023-11-21 4:08:12329 days ago1700539692
0x7428d3A9...d6E1Cda0E
7 ETH
3607942023-11-21 1:00:24329 days ago1700528424
0x7428d3A9...d6E1Cda0E
0.001 ETH
3607942023-11-21 1:00:24329 days ago1700528424
0x7428d3A9...d6E1Cda0E
0.001 ETH
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)

File 1 of 28 : RocketNodeDeposit.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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

import "../RocketBase.sol";
import "../../interface/deposit/RocketDepositPoolInterface.sol";
import "../../interface/minipool/RocketMinipoolInterface.sol";
import "../../interface/minipool/RocketMinipoolManagerInterface.sol";
import "../../interface/minipool/RocketMinipoolQueueInterface.sol";
import "../../interface/network/RocketNetworkFeesInterface.sol";
import "../../interface/node/RocketNodeDepositInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsDepositInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNetworkInterface.sol";
import "../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsMembersInterface.sol";
import "../../types/MinipoolDeposit.sol";
import "../../interface/node/RocketNodeManagerInterface.sol";
import "../../interface/RocketVaultInterface.sol";
import "../../interface/node/RocketNodeStakingInterface.sol";
import "../network/RocketNetworkSnapshots.sol";
import "../../interface/RocketVaultWithdrawerInterface.sol";

/// @notice Handles node deposits and minipool creation
contract RocketNodeDeposit is RocketBase, RocketNodeDepositInterface, RocketVaultWithdrawerInterface {

    // 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);

    function receiveVaultWithdrawalETH() external payable {}

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

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

    /// @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 _nodeAddress, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(_nodeAddress) {
        // 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", _nodeAddress)), _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 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 _minimumNodeFee Transaction will revert if network commission rate drops below this amount
    /// @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)
    /// @param _salt Salt used to deterministically construct the minipool's address
    /// @param _expectedMinipoolAddress The expected deterministic minipool address. Will revert if it doesn't match
    function deposit(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        // Check amount
        require(msg.value == _bondAmount, "Invalid value");
        // Process the deposit
        _deposit(_bondAmount, _minimumNodeFee, _validatorPubkey, _validatorSignature, _depositDataRoot, _salt, _expectedMinipoolAddress);
    }

    /// @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 _minimumNodeFee Transaction will revert if network commission rate drops below this amount
    /// @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)
    /// @param _salt Salt used to deterministically construct the minipool's address
    /// @param _expectedMinipoolAddress The expected deterministic minipool address. Will revert if it doesn't match
    function depositWithCredit(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) 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, _minimumNodeFee, _validatorPubkey, _validatorSignature, _depositDataRoot, _salt, _expectedMinipoolAddress);
    }

    /// @notice Returns true if the given amount is a valid deposit amount
    function isValidDepositAmount(uint256 _amount) override public pure returns (bool) {
        return _amount == 16 ether || _amount == 8 ether;
    }

    /// @notice Returns an array of valid deposit amounts
    function getDepositAmounts() override external pure returns (uint256[] memory) {
        uint256[] memory amounts = new uint256[](2);
        amounts[0] = 16 ether;
        amounts[1] = 8 ether;
        return amounts;
    }

    /// @dev Internal logic to process a deposit
    function _deposit(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) private {
        // Check pre-conditions
        checkDepositsEnabled();
        checkDistributorInitialised();
        checkNodeFee(_minimumNodeFee);
        require(isValidDepositAmount(_bondAmount), "Invalid deposit amount");
        // Get launch constants
        uint256 launchAmount;
        uint256 preLaunchValue;
        {
            RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
            launchAmount = rocketDAOProtocolSettingsMinipool.getLaunchBalance();
            preLaunchValue = rocketDAOProtocolSettingsMinipool.getPreLaunchValue();
        }
        // Emit deposit received event
        emit DepositReceived(msg.sender, msg.value, block.timestamp);
        // Increase ETH matched (used to calculate RPL collateral requirements)
        _increaseEthMatched(msg.sender, launchAmount- _bondAmount);
        // Create the minipool
        RocketMinipoolInterface minipool = createMinipool(_salt, _expectedMinipoolAddress);
        // Process node deposit
        _processNodeDeposit(preLaunchValue, _bondAmount);
        // Perform the pre deposit
        minipool.preDeposit{value: preLaunchValue}(_bondAmount, _validatorPubkey, _validatorSignature, _depositDataRoot);
        // Enqueue the minipool
        enqueueMinipool(address(minipool));
        // Assign deposits if enabled
        assignDeposits();
    }

    /// @dev Processes a node deposit with the deposit pool
    /// @param _preLaunchValue The prelaunch value (result of call to `RocketDAOProtocolSettingsMinipool.getPreLaunchValue()`
    /// @param _bondAmount The bond amount for this deposit
    function _processNodeDeposit(uint256 _preLaunchValue, uint256 _bondAmount) private {
        // Get contracts
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        // Retrieve ETH from deposit pool if required
        uint256 shortFall = 0;
        if (msg.value < _preLaunchValue) {
            shortFall = _preLaunchValue- msg.value;
            rocketDepositPool.nodeCreditWithdrawal(shortFall);
        }
        uint256 remaining = msg.value + shortFall - _preLaunchValue;
        // Deposit the left over value into the deposit pool
        rocketDepositPool.nodeDeposit{value: remaining}(_bondAmount - _preLaunchValue);
    }

    /// @notice Creates a "vacant" minipool which a node operator can use to migrate a validator with a BLS withdrawal credential
    /// @param _bondAmount The amount of capital the node operator wants to put up as his bond
    /// @param _minimumNodeFee Transaction will revert if network commission rate drops below this amount
    /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate
    /// @param _salt Salt used to deterministically construct the minipool's address
    /// @param _expectedMinipoolAddress The expected deterministic minipool address. Will revert if it doesn't match
    /// @param _currentBalance The current balance of the validator on the beaconchain (will be checked by oDAO and scrubbed if not correct)
    function createVacantMinipool(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, uint256 _salt, address _expectedMinipoolAddress, uint256 _currentBalance) override external onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        // Check pre-conditions
        checkVacantMinipoolsEnabled();
        checkDistributorInitialised();
        checkNodeFee(_minimumNodeFee);
        require(isValidDepositAmount(_bondAmount), "Invalid deposit amount");
        // Increase ETH matched (used to calculate RPL collateral requirements)
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        uint256 launchAmount = rocketDAOProtocolSettingsMinipool.getLaunchBalance();
        _increaseEthMatched(msg.sender, launchAmount - _bondAmount);
        // Create the minipool
        _createVacantMinipool(_salt, _validatorPubkey, _bondAmount, _expectedMinipoolAddress, _currentBalance);
    }

    /// @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
    function increaseEthMatched(address _nodeAddress, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) onlyLatestNetworkContract() {
        // Try to distribute any existing rewards at the previous collateral rate
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        rocketMinipoolManager.tryDistribute(_nodeAddress);
        // Increase ETH matched
        _increaseEthMatched(_nodeAddress, _amount);
    }

    /// @dev Increases the amount of ETH that has been matched against a node operators bond. Reverts if it exceeds the
    ///      collateralisation requirements of the network
    function _increaseEthMatched(address _nodeAddress, uint256 _amount) private {
        // Check amount doesn't exceed limits
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        RocketNetworkSnapshots rocketNetworkSnapshots = RocketNetworkSnapshots(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, uint32(block.number), uint224(ethMatched));
    }

    /// @dev Adds a minipool to the queue
    function enqueueMinipool(address _minipoolAddress) private {
        // Add minipool to queue
        RocketMinipoolQueueInterface(getContractAddress("rocketMinipoolQueue")).enqueueMinipool(_minipoolAddress);
    }

    /// @dev Reverts if node operator has not initialised their fee distributor
    function checkDistributorInitialised() private view {
        // Check node has initialised their fee distributor
        RocketNodeManagerInterface rocketNodeManager = RocketNodeManagerInterface(getContractAddress("rocketNodeManager"));
        require(rocketNodeManager.getFeeDistributorInitialised(msg.sender), "Fee distributor not initialised");
    }

    /// @dev Creates a minipool and returns an instance of it
    /// @param _salt The salt used to determine the minipools address
    /// @param _expectedMinipoolAddress The expected minipool address. Reverts if not correct
    function createMinipool(uint256 _salt, address _expectedMinipoolAddress) private returns (RocketMinipoolInterface) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        // Check minipool doesn't exist or previously exist
        require(!rocketMinipoolManager.getMinipoolExists(_expectedMinipoolAddress) && !rocketMinipoolManager.getMinipoolDestroyed(_expectedMinipoolAddress), "Minipool already exists or was previously destroyed");
        // Create minipool
        RocketMinipoolInterface minipool = rocketMinipoolManager.createMinipool(msg.sender, _salt);
        // Ensure minipool address matches expected
        require(address(minipool) == _expectedMinipoolAddress, "Unexpected minipool address");
        // Return
        return minipool;
    }

    /// @dev Creates a vacant minipool and returns an instance of it
    /// @param _salt The salt used to determine the minipools address
    /// @param _validatorPubkey Pubkey of the validator owning this minipool
    /// @param _bondAmount ETH value the node operator is putting up as capital for this minipool
    /// @param _expectedMinipoolAddress The expected minipool address. Reverts if not correct
    /// @param _currentBalance The current balance of the validator on the beaconchain (will be checked by oDAO and scrubbed if not correct)
    function _createVacantMinipool(uint256 _salt, bytes calldata _validatorPubkey, uint256 _bondAmount, address _expectedMinipoolAddress, uint256 _currentBalance) private returns (RocketMinipoolInterface) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        // Check minipool doesn't exist or previously exist
        require(!rocketMinipoolManager.getMinipoolExists(_expectedMinipoolAddress) && !rocketMinipoolManager.getMinipoolDestroyed(_expectedMinipoolAddress), "Minipool already exists or was previously destroyed");
        // Create minipool
        RocketMinipoolInterface minipool = rocketMinipoolManager.createVacantMinipool(msg.sender, _salt, _validatorPubkey, _bondAmount, _currentBalance);
        // Ensure minipool address matches expected
        require(address(minipool) == _expectedMinipoolAddress, "Unexpected minipool address");
        // Return
        return minipool;
    }

    /// @dev Reverts if network node fee is below a minimum
    /// @param _minimumNodeFee The minimum node fee required to not revert
    function checkNodeFee(uint256 _minimumNodeFee) private view {
        // Load contracts
        RocketNetworkFeesInterface rocketNetworkFees = RocketNetworkFeesInterface(getContractAddress("rocketNetworkFees"));
        // Check current node fee
        uint256 nodeFee = rocketNetworkFees.getNodeFee();
        require(nodeFee >= _minimumNodeFee, "Minimum node fee exceeds current network node fee");
    }

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

    /// @dev Reverts if vacant minipools are not enabled
    function checkVacantMinipoolsEnabled() private view {
        // Get contracts
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Check node settings
        require(rocketDAOProtocolSettingsNode.getVacantMinipoolsEnabled(), "Vacant minipools are currently disabled");
    }

    /// @dev Executes an assignDeposits call on the deposit pool
    function assignDeposits() private {
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        rocketDepositPool.maybeAssignDeposits();
    }
}

File 2 of 28 : RocketStorageInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

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;
}

File 3 of 28 : RocketBase.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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 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); }
}

File 4 of 28 : RocketDepositPoolInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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 getExcessBalance() external view returns (uint256);
    function deposit() external payable;
    function getMaximumDepositAmount() external view returns (uint256);
    function nodeDeposit(uint256 _totalAmount) external payable;
    function nodeCreditWithdrawal(uint256 _amount) external;
    function recycleDissolvedDeposit() external payable;
    function recycleExcessCollateral() external payable;
    function recycleLiquidatedStake() external payable;
    function assignDeposits() external;
    function maybeAssignDeposits() external returns (bool);
    function withdrawExcessBalance(uint256 _amount) external;
}

File 5 of 28 : MinipoolDeposit.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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
}

File 6 of 28 : MinipoolStatus.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

// Represents a minipool's status within the network

enum MinipoolStatus {
    Initialised,    // The minipool has been initialised and is awaiting a deposit of user ETH
    Prelaunch,      // The minipool has enough ETH to begin staking and is awaiting launch by the node operator
    Staking,        // The minipool is currently staking
    Withdrawable,   // NO LONGER USED
    Dissolved       // The minipool has been dissolved and its user deposited ETH has been returned to the deposit pool
}

File 7 of 28 : RocketMinipoolInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

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

interface RocketMinipoolInterface {
    function version() external view returns (uint8);
    function initialise(address _nodeAddress) external;
    function getStatus() external view returns (MinipoolStatus);
    function getFinalised() external view returns (bool);
    function getStatusBlock() external view returns (uint256);
    function getStatusTime() external view returns (uint256);
    function getScrubVoted(address _member) external view returns (bool);
    function getDepositType() external view returns (MinipoolDeposit);
    function getNodeAddress() external view returns (address);
    function getNodeFee() external view returns (uint256);
    function getNodeDepositBalance() external view returns (uint256);
    function getNodeRefundBalance() external view returns (uint256);
    function getNodeDepositAssigned() external view returns (bool);
    function getPreLaunchValue() external view returns (uint256);
    function getNodeTopUpValue() external view returns (uint256);
    function getVacant() external view returns (bool);
    function getPreMigrationBalance() external view returns (uint256);
    function getUserDistributed() external view returns (bool);
    function getUserDepositBalance() external view returns (uint256);
    function getUserDepositAssigned() external view returns (bool);
    function getUserDepositAssignedTime() external view returns (uint256);
    function getTotalScrubVotes() external view returns (uint256);
    function calculateNodeShare(uint256 _balance) external view returns (uint256);
    function calculateUserShare(uint256 _balance) external view returns (uint256);
    function preDeposit(uint256 _bondingValue, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function deposit() external payable;
    function userDeposit() external payable;
    function distributeBalance(bool _rewardsOnly) external;
    function beginUserDistribute() external;
    function userDistributeAllowed() external view returns (bool);
    function refund() external;
    function slash() external;
    function finalise() external;
    function canStake() external view returns (bool);
    function canPromote() external view returns (bool);
    function stake(bytes calldata _validatorSignature, bytes32 _depositDataRoot) external;
    function prepareVacancy(uint256 _bondAmount, uint256 _currentBalance) external;
    function promote() external;
    function dissolve() external;
    function close() external;
    function voteScrub() external;
    function reduceBondAmount() external;
}

File 8 of 28 : MinipoolDetails.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

import "./MinipoolDeposit.sol";
import "./MinipoolStatus.sol";

// A struct containing all the information on-chain about a specific minipool

struct MinipoolDetails {
    bool exists;
    address minipoolAddress;
    bytes pubkey;
    MinipoolStatus status;
    uint256 statusBlock;
    uint256 statusTime;
    bool finalised;
    MinipoolDeposit depositType;
    uint256 nodeFee;
    uint256 nodeDepositBalance;
    bool nodeDepositAssigned;
    uint256 userDepositBalance;
    bool userDepositAssigned;
    uint256 userDepositAssignedTime;
    bool useLatestDelegate;
    address delegate;
    address previousDelegate;
    address effectiveDelegate;
    uint256 penaltyCount;
    uint256 penaltyRate;
    address nodeAddress;
}

File 9 of 28 : RocketMinipoolManagerInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;
pragma abicoder v2;

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

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

interface RocketMinipoolManagerInterface {
    function getMinipoolCount() external view returns (uint256);
    function getStakingMinipoolCount() external view returns (uint256);
    function getFinalisedMinipoolCount() external view returns (uint256);
    function getActiveMinipoolCount() external view returns (uint256);
    function getMinipoolRPLSlashed(address _minipoolAddress) external view returns (bool);
    function getMinipoolCountPerStatus(uint256 offset, uint256 limit) external view returns (uint256, uint256, uint256, uint256, uint256);
    function getPrelaunchMinipools(uint256 offset, uint256 limit) external view returns (address[] memory);
    function getMinipoolAt(uint256 _index) external view returns (address);
    function getNodeMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeActiveMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeFinalisedMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeStakingMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeStakingMinipoolCountBySize(address _nodeAddress, uint256 _depositSize) external view returns (uint256);
    function getNodeMinipoolAt(address _nodeAddress, uint256 _index) external view returns (address);
    function getNodeValidatingMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeValidatingMinipoolAt(address _nodeAddress, uint256 _index) external view returns (address);
    function getMinipoolByPubkey(bytes calldata _pubkey) external view returns (address);
    function getMinipoolExists(address _minipoolAddress) external view returns (bool);
    function getMinipoolDestroyed(address _minipoolAddress) external view returns (bool);
    function getMinipoolPubkey(address _minipoolAddress) external view returns (bytes memory);
    function updateNodeStakingMinipoolCount(uint256 _previousBond, uint256 _newBond, uint256 _previousFee, uint256 _newFee) external;
    function getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory);
    function createMinipool(address _nodeAddress, uint256 _salt) external returns (RocketMinipoolInterface);
    function createVacantMinipool(address _nodeAddress, uint256 _salt, bytes calldata _validatorPubkey, uint256 _bondAmount, uint256 _currentBalance) external returns (RocketMinipoolInterface);
    function removeVacantMinipool() external;
    function getVacantMinipoolCount() external view returns (uint256);
    function getVacantMinipoolAt(uint256 _index) external view returns (address);
    function destroyMinipool() external;
    function incrementNodeStakingMinipoolCount(address _nodeAddress) external;
    function decrementNodeStakingMinipoolCount(address _nodeAddress) external;
    function tryDistribute(address _nodeAddress) external;
    function incrementNodeFinalisedMinipoolCount(address _nodeAddress) external;
    function setMinipoolPubkey(bytes calldata _pubkey) external;
    function getMinipoolDepositType(address _minipoolAddress) external view returns (MinipoolDeposit);
}

File 10 of 28 : RocketMinipoolQueueInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

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

interface RocketMinipoolQueueInterface {
    function getTotalLength() external view returns (uint256);
    function getContainsLegacy() external view returns (bool);
    function getLengthLegacy(MinipoolDeposit _depositType) external view returns (uint256);
    function getLength() external view returns (uint256);
    function getTotalCapacity() external view returns (uint256);
    function getEffectiveCapacity() external view returns (uint256);
    function getNextCapacityLegacy() external view returns (uint256);
    function getNextDepositLegacy() external view returns (MinipoolDeposit, uint256);
    function enqueueMinipool(address _minipool) external;
    function dequeueMinipoolByDepositLegacy(MinipoolDeposit _depositType) external returns (address minipoolAddress);
    function dequeueMinipools(uint256 _maxToDequeue) external returns (address[] memory minipoolAddress);
    function removeMinipool(MinipoolDeposit _depositType) external;
    function getMinipoolAt(uint256 _index) external view returns(address);
    function getMinipoolPosition(address _minipool) external view returns (int256);
}

File 11 of 28 : RocketNetworkFeesInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketNetworkFeesInterface {
    function getNodeDemand() external view returns (int256);
    function getNodeFee() external view returns (uint256);
    function getNodeFeeByDemand(int256 _nodeDemand) external view returns (uint256);
}

File 12 of 28 : RocketNodeDepositInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

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

interface RocketNodeDepositInterface {
    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, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) external payable;
    function depositWithCredit(uint256 _depositAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _salt, address _expectedMinipoolAddress) external payable;
    function isValidDepositAmount(uint256 _amount) external pure returns (bool);
    function getDepositAmounts() external pure returns (uint256[] memory);
    function createVacantMinipool(uint256 _bondAmount, uint256 _minimumNodeFee, bytes calldata _validatorPubkey, uint256 _salt, address _expectedMinipoolAddress, uint256 _currentBalance) external;
    function increaseEthMatched(address _nodeAddress, uint256 _amount) external;
}

File 13 of 28 : RocketDAOProtocolSettingsDepositInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDAOProtocolSettingsDepositInterface {
    function getDepositEnabled() external view returns (bool);
    function getAssignDepositsEnabled() external view returns (bool);
    function getMinimumDeposit() external view returns (uint256);
    function getMaximumDepositPoolSize() external view returns (uint256);
    function getMaximumDepositAssignments() external view returns (uint256);
    function getMaximumDepositSocialisedAssignments() external view returns (uint256);
    function getDepositFee() external view returns (uint256);
}

File 14 of 28 : RocketDAOProtocolSettingsMinipoolInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

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

interface RocketDAOProtocolSettingsMinipoolInterface {
    function getLaunchBalance() external view returns (uint256);
    function getPreLaunchValue() external pure returns (uint256);
    function getDepositUserAmount(MinipoolDeposit _depositType) external view returns (uint256);
    function getFullDepositUserAmount() external view returns (uint256);
    function getHalfDepositUserAmount() external view returns (uint256);
    function getVariableDepositAmount() external view returns (uint256);
    function getSubmitWithdrawableEnabled() external view returns (bool);
    function getBondReductionEnabled() external view returns (bool);
    function getLaunchTimeout() external view returns (uint256);
    function getMaximumCount() external view returns (uint256);
    function isWithinUserDistributeWindow(uint256 _time) external view returns (bool);
    function hasUserDistributeWindowPassed(uint256 _time) external view returns (bool);
    function getUserDistributeWindowStart() external view returns (uint256);
    function getUserDistributeWindowLength() external view returns (uint256);
}

File 15 of 28 : RocketDAOProtocolSettingsNodeInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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);
}

File 16 of 28 : RocketDAOProtocolSettingsNetworkInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDAOProtocolSettingsNetworkInterface {
    function getNodeConsensusThreshold() external view returns (uint256);
    function getNodePenaltyThreshold() external view returns (uint256);
    function getPerPenaltyRate() external view returns (uint256);
    function getSubmitBalancesEnabled() external view returns (bool);
    function getSubmitBalancesFrequency() external view returns (uint256);
    function getSubmitPricesEnabled() external view returns (bool);
    function getSubmitPricesFrequency() external view returns (uint256);
    function getMinimumNodeFee() external view returns (uint256);
    function getTargetNodeFee() external view returns (uint256);
    function getMaximumNodeFee() external view returns (uint256);
    function getNodeFeeDemandRange() external view returns (uint256);
    function getTargetRethCollateralRate() external view returns (uint256);
    function getRethDepositDelay() external view returns (uint256);
    function getSubmitRewardsEnabled() external view returns (bool);
}

File 17 of 28 : RocketDAONodeTrustedInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDAONodeTrustedInterface {
    function getBootstrapModeDisabled() external view returns (bool);
    function getMemberQuorumVotesRequired() external view returns (uint256);
    function getMemberAt(uint256 _index) external view returns (address);
    function getMemberCount() external view returns (uint256);
    function getMemberMinRequired() external view returns (uint256);
    function getMemberIsValid(address _nodeAddress) external view returns (bool);
    function getMemberLastProposalTime(address _nodeAddress) external view returns (uint256);
    function getMemberID(address _nodeAddress) external view returns (string memory);
    function getMemberUrl(address _nodeAddress) external view returns (string memory);
    function getMemberJoinedTime(address _nodeAddress) external view returns (uint256);
    function getMemberProposalExecutedTime(string memory _proposalType, address _nodeAddress) external view returns (uint256);
    function getMemberRPLBondAmount(address _nodeAddress) external view returns (uint256);
    function getMemberIsChallenged(address _nodeAddress) external view returns (bool);
    function getMemberUnbondedValidatorCount(address _nodeAddress) external view returns (uint256);
    function incrementMemberUnbondedValidatorCount(address _nodeAddress) external;
    function decrementMemberUnbondedValidatorCount(address _nodeAddress) external;
    function bootstrapMember(string memory _id, string memory _url, address _nodeAddress) external;
    function bootstrapSettingUint(string memory _settingContractName, string memory _settingPath, uint256 _value) external;
    function bootstrapSettingBool(string memory _settingContractName, string memory _settingPath, bool _value) external;
    function bootstrapUpgrade(string memory _type, string memory _name, string memory _contractAbi, address _contractAddress) external;
    function bootstrapDisable(bool _confirmDisableBootstrapMode) external;
    function memberJoinRequired(string memory _id, string memory _url) external;
}

File 18 of 28 : RocketDAONodeTrustedSettingsMembersInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDAONodeTrustedSettingsMembersInterface {
    function getQuorum() external view returns (uint256);
    function getRPLBond() external view returns(uint256);
    function getMinipoolUnbondedMax() external view returns(uint256);
    function getMinipoolUnbondedMinFee() external view returns(uint256);
    function getChallengeCooldown() external view returns(uint256);
    function getChallengeWindow() external view returns(uint256);
    function getChallengeCost() external view returns(uint256);
}

File 19 of 28 : NodeDetails.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

// A struct containing all the information on-chain about a specific node

struct NodeDetails {
    bool exists;
    uint256 registrationTime;
    string timezoneLocation;
    bool feeDistributorInitialised;
    address feeDistributorAddress;
    uint256 rewardNetwork;
    uint256 rplStake;
    uint256 effectiveRPLStake;
    uint256 minimumRPLStake;
    uint256 maximumRPLStake;
    uint256 ethMatched;
    uint256 ethMatchedLimit;
    uint256 minipoolCount;
    uint256 balanceETH;
    uint256 balanceRETH;
    uint256 balanceRPL;
    uint256 balanceOldRPL;
    uint256 depositCreditBalance;
    uint256 distributorBalanceUserETH;
    uint256 distributorBalanceNodeETH;
    address withdrawalAddress;
    address pendingWithdrawalAddress;
    bool smoothingPoolRegistrationState;
    uint256 smoothingPoolRegistrationChanged;
    address nodeAddress;
}

File 20 of 28 : RocketNodeManagerInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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

import "../../types/NodeDetails.sol";

interface RocketNodeManagerInterface {

    // Structs
    struct TimezoneCount {
        string timezone;
        uint256 count;
    }

    function getNodeCount() external view returns (uint256);
    function getNodeCountPerTimezone(uint256 offset, uint256 limit) external view returns (TimezoneCount[] memory);
    function getNodeAt(uint256 _index) external view returns (address);
    function getNodeExists(address _nodeAddress) external view returns (bool);
    function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address);
    function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address);
    function getNodeRPLWithdrawalAddress(address _nodeAddress) external view returns (address);
    function getNodeRPLWithdrawalAddressIsSet(address _nodeAddress) external view returns (bool);
    function unsetRPLWithdrawalAddress(address _nodeAddress) external;
    function setRPLWithdrawalAddress(address _nodeAddress, address _newRPLWithdrawalAddress, bool _confirm) external;
    function confirmRPLWithdrawalAddress(address _nodeAddress) external;
    function getNodePendingRPLWithdrawalAddress(address _nodeAddress) external view returns (address);
    function getNodeTimezoneLocation(address _nodeAddress) external view returns (string memory);
    function registerNode(string calldata _timezoneLocation) external;
    function getNodeRegistrationTime(address _nodeAddress) external view returns (uint256);
    function setTimezoneLocation(string calldata _timezoneLocation) external;
    function setRewardNetwork(address _nodeAddress, uint256 network) external;
    function getRewardNetwork(address _nodeAddress) external view returns (uint256);
    function getFeeDistributorInitialised(address _nodeAddress) external view returns (bool);
    function initialiseFeeDistributor() external;
    function getAverageNodeFee(address _nodeAddress) external view returns (uint256);
    function setSmoothingPoolRegistrationState(bool _state) external;
    function getSmoothingPoolRegistrationState(address _nodeAddress) external returns (bool);
    function getSmoothingPoolRegistrationChanged(address _nodeAddress) external returns (uint256);
    function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) external view returns (uint256);
    function getNodeDetails(address _nodeAddress) external view returns (NodeDetails memory);
    function getNodeAddresses(uint256 _offset, uint256 _limit) external view returns (address[] memory);
}

File 21 of 28 : IERC20.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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

File 22 of 28 : IERC20Burnable.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

// 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;
}

File 23 of 28 : RocketVaultInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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;
}

File 24 of 28 : RocketNodeStakingInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

// 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 withdrawRPL(uint256 _amount) external;
    function withdrawRPL(address _nodeAddress, uint256 _amount) external;
    function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) external;
}

File 25 of 28 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 26 of 28 : RocketNetworkSnapshotsInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

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

struct Checkpoint224 {
    uint32 _block;
    uint224 _value;
}

/// @notice Accounting for snapshotting of values based on block numbers
interface RocketNetworkSnapshotsInterface {
    function push(bytes32 _key, uint32 _block, 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 lookupRecent(bytes32 _key, uint32 _block, uint256 _recency) external view returns (uint224);
}

File 27 of 28 : RocketNetworkSnapshots.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

// SPDX-License-Identifier: MIT
// Copyright (c) 2016-2023 zOS Global Limited and contributors
// Adapted from OpenZeppelin `Checkpoints` contract
pragma solidity 0.8.18;

import "@openzeppelin4/contracts/utils/math/Math.sol";

import "../RocketBase.sol";
import "../../interface/network/RocketNetworkSnapshotsInterface.sol";

/// @notice Accounting for snapshotting of values based on block numbers
contract RocketNetworkSnapshots is RocketBase, RocketNetworkSnapshotsInterface {

    constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
        // Set contract version
        version = 1;
    }

    function push(bytes32 _key, uint32 _block, uint224 _value) onlyLatestContract("rocketNetworkSnapshots", address(this)) onlyLatestNetworkContract external {
        _insert(_key, _block, _value);
    }

    function length(bytes32 _key) public view returns (uint256) {
        return rocketStorage.getUint(keccak256(abi.encodePacked("snapshot.length", _key)));
    }

    function latest(bytes32 _key) external view returns (bool, uint32, uint224) {
        uint256 len = length(_key);
        if (len == 0) {
            return (false, 0, 0);
        }
        Checkpoint224 memory checkpoint = _load(_key, len - 1);
        return (true, checkpoint._block, checkpoint._value);
    }

    function latestBlock(bytes32 _key) external view returns (uint32) {
        uint256 len = length(_key);
        return len == 0 ? 0 : _blockAt(_key, len - 1);
    }

    function latestValue(bytes32 _key) external view returns (uint224) {
        uint256 len = length(_key);
        return len == 0 ? 0 : _valueAt(_key, len - 1);
    }

    function lookup(bytes32 _key, uint32 _block) external view returns (uint224) {
        uint256 len = length(_key);
        uint256 pos = _binaryLookup(_key, _block, 0, len);
        return pos == 0 ? 0 : _valueAt(_key, pos - 1);
    }

    function lookupRecent(bytes32 _key, uint32 _block, uint256 _recency) external view returns (uint224) {
        uint256 len = length(_key);

        uint256 low = 0;
        uint256 high = len;

        if (len > 5 && len > _recency) {
            uint256 mid = len - _recency;
            if (_block < _blockAt(_key, mid)) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        uint256 pos = _binaryLookup(_key, _block, low, high);

        return pos == 0 ? 0 : _valueAt(_key, pos - 1);
    }

    function _insert(bytes32 _key, uint32 _block, uint224 _value) private {
        uint256 pos = length(_key);

        if (pos > 0) {
            Checkpoint224 memory last = _load(_key, pos - 1);

            // Checkpoint keys must be non-decreasing.
            require (last._block <= _block, "Unordered snapshot insertion");

            // Update or push new checkpoint
            if (last._block == _block) {
                last._value = _value;
                _set(_key, pos - 1, last);
            } else {
                _push(_key, Checkpoint224({_block: _block, _value: _value}));
            }
        } else {
            _push(_key, Checkpoint224({_block: _block, _value: _value}));
        }
    }

    function _binaryLookup(
        bytes32 _key,
        uint32 _block,
        uint256 _low,
        uint256 _high
    ) private view returns (uint256) {
        while (_low < _high) {
            uint256 mid = Math.average(_low, _high);
            if (_blockAt(_key, mid) > _block) {
                _high = mid;
            } else {
                _low = mid + 1;
            }
        }
        return _high;
    }

    function _load(bytes32 _key, uint256 _pos) private view returns (Checkpoint224 memory) {
        bytes32 key = bytes32(uint256(_key) + _pos);
        bytes32 raw = rocketStorage.getBytes32(key);
        Checkpoint224 memory result;
        result._block = uint32(uint256(raw) >> 224);
        result._value = uint224(uint256(raw) & (2 ** 224 - 1));
        return result;
    }

    function _blockAt(bytes32 _key, uint256 _pos) private view returns (uint32) {
        bytes32 key = bytes32(uint256(_key) + _pos);
        bytes32 raw = rocketStorage.getBytes32(key);
        return uint32(uint256(raw) >> 224);
    }

    function _valueAt(bytes32 _key, uint256 _pos) private view returns (uint224) {
        bytes32 key = bytes32(uint256(_key) + _pos);
        bytes32 raw = rocketStorage.getBytes32(key);
        return uint224(uint256(raw) & (2 ** 224 - 1));
    }

    function _push(bytes32 _key, Checkpoint224 memory _item) private {
        bytes32 lengthKey = keccak256(abi.encodePacked("snapshot.length", _key));
        uint256 snapshotLength = rocketStorage.getUint(lengthKey);
        bytes32 key = bytes32(uint256(_key) + snapshotLength);
        rocketStorage.setUint(lengthKey, snapshotLength + 1);
        rocketStorage.setBytes32(key, _encode(_item));
    }

    function _set(bytes32 _key, uint256 _pos, Checkpoint224 memory _item) private {
        bytes32 key = bytes32(uint256(_key) + _pos);
        rocketStorage.setBytes32(key, _encode(_item));
    }

    function _encode(Checkpoint224 memory _item) private pure returns (bytes32) {
        return bytes32(
            uint256(_item._block) << 224 | uint256(_item._value)
        );
    }
}

File 28 of 28 : RocketVaultWithdrawerInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketVaultWithdrawerInterface {
    function receiveVaultWithdrawalETH() external payable; 
}

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

Contract ABI

[{"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":"uint256","name":"_minimumNodeFee","type":"uint256"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"address","name":"_expectedMinipoolAddress","type":"address"},{"internalType":"uint256","name":"_currentBalance","type":"uint256"}],"name":"createVacantMinipool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumNodeFee","type":"uint256"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"address","name":"_expectedMinipoolAddress","type":"address"}],"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":"uint256","name":"_minimumNodeFee","type":"uint256"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"},{"internalType":"uint256","name":"_salt","type":"uint256"},{"internalType":"address","name":"_expectedMinipoolAddress","type":"address"}],"name":"depositWithCredit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getDepositAmounts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"pure","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":"_nodeAddress","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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"isValidDepositAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","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"}]

608060405260008054610100600160a81b03191690553480156200002257600080fd5b50604051620037ac380380620037ac83398101604081905262000045916200007a565b6000805460ff196001600160a01b0390931661010002929092166001600160a81b0319909216919091176004179055620000ac565b6000602082840312156200008d57600080fd5b81516001600160a01b0381168114620000a557600080fd5b9392505050565b6136f080620000bc6000396000f3fe6080604052600436106100f75760003560e01c80636637714e1161008a578063aa5c937411610059578063aa5c93741461038c578063c095415d146101e1578063eee3f07a146103ac578063f5746ee0146103bf57600080fd5b80636637714e1461030a578063940829061461032a57806398913c8d1461034a5780639bed5a451461036a57600080fd5b8063493c9467116100c6578063493c94671461028b57806354fd4d50146102ab578063598d90c5146102d7578063643ff9fe146102ea57600080fd5b80631b9a91a4146101e8578063206b427114610208578063300d9d991461023b5780633ee36db41461026b57600080fd5b366101e3576040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c00000000000000000000000000000081525033610162826040516020016101479190613251565b604051602081830303815290604052805190602001206103d2565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146101e15760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064015b60405180910390fd5b005b600080fd5b3480156101f457600080fd5b506101e16102033660046132cb565b610470565b34801561021457600080fd5b506102286102233660046132f7565b6109b0565b6040519081526020015b60405180910390f35b34801561024757600080fd5b5061025b61025636600461331b565b6109ce565b6040519015158152602001610232565b34801561027757600080fd5b506102286102863660046132f7565b6109ef565b34801561029757600080fd5b506102286102a63660046132f7565b610a03565b3480156102b757600080fd5b506000546102c59060ff1681565b60405160ff9091168152602001610232565b6101e16102e536600461337d565b610a6b565b3480156102f657600080fd5b506101e16103053660046132cb565b610c3d565b34801561031657600080fd5b506102286103253660046132f7565b610f1b565b34801561033657600080fd5b506102286103453660046132f7565b610f6c565b34801561035657600080fd5b506101e1610365366004613426565b611042565b34801561037657600080fd5b5061037f6112dc565b60405161023291906134a4565b34801561039857600080fd5b506101e16103a73660046132cb565b611355565b6101e16103ba3660046132f7565b6115a7565b6101e16103cd36600461337d565b611876565b600080546040517f21f8a7210000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff16906321f8a72190602401602060405180830381865afa158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906134e8565b92915050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306104bb826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105355760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606086901b16602b820152849061059c90603f015b60405160208183030381529060405280519060200120611c2a565b6105e85760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b600080546040517f5b49ff6200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015261010090920490911690635b49ff6290602401602060405180830381865afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068391906134e8565b90503373ffffffffffffffffffffffffffffffffffffffff8216146107105760405162461bcd60e51b815260206004820152602860248201527f4f6e6c79207769746864726177616c20616464726573732063616e207769746860448201527f647261772045544800000000000000000000000000000000000000000000000060648201526084016101d8565b600061071b87610f1b565b90508581101561076d5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e636500000000000000000000000060448201526064016101d8565b6040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff19606089901b1660308201526107dd906044016040516020818303038152906040528051906020012087836107d89190613534565b611cc2565b600061081d6040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611d56565b6040517f3bed33ce0000000000000000000000000000000000000000000000000000000081526004810189905290915073ffffffffffffffffffffffffffffffffffffffff821690633bed33ce90602401600060405180830381600087803b15801561088857600080fd5b505af115801561089c573d6000803e3d6000fd5b5050505060008373ffffffffffffffffffffffffffffffffffffffff168860405160006040518083038185875af1925050503d80600081146108fa576040519150601f19603f3d011682016040523d82523d6000602084013e6108ff565b606091505b50509050806109505760405162461bcd60e51b815260206004820152601660248201527f4661696c656420746f207769746864726177204554480000000000000000000060448201526064016101d8565b6040805189815242602082015273ffffffffffffffffffffffffffffffffffffffff80871692908c16917f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1910160405180910390a3505050505050505050565b60006109bb82610f1b565b6109c483610a03565b61046a9190613547565b60008167de0b6b3a76400000148061046a575050676f05b59d3b2000001490565b60006109fa82610f1b565b6109c483610f6c565b6040517f6e6f64652e6465706f7369742e6372656469742e62616c616e6365000000000060208201526bffffffffffffffffffffffff19606083901b16603b82015260009061046a90604f015b60405160208183030381529060405280519060200120611dd2565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610ab6826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b305760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b33610b838160405160200161058191907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b610bcf5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b8b3414610c1e5760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c75650000000000000000000000000000000000000060448201526064016101d8565b610c2f8c8c8c8c8c8c8c8c8c611e6a565b505050505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610c88826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d025760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606086901b16602b8201528490610d5290603f01610581565b610d9e5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6040517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602f820152610deb90604301610581565b80610e3e57506040517f636f6e74726163742e657869737473000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602f820152610e3e90604301610581565b610eaf5760405162461bcd60e51b8152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f726163740000000000000000000000000000000000000000000000000000000060648201526084016101d8565b6040517f6e6f64652e6465706f7369742e6372656469742e62616c616e6365000000000060208201526bffffffffffffffffffffffff19606087901b16603b820152610f1490604f0160405160208183030381529060405280519060200120856120cb565b5050505050565b6040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff19606083901b16603082015260009061046a90604401610a50565b600080610fad6040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d56565b905060008173ffffffffffffffffffffffffffffffffffffffff166312065fe06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ffc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611020919061355a565b9050600061102d85610a03565b90508181111561103a5750805b949350505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f7369740000000000000000000000000000008152503061108d826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111075760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b3361115a8160405160200161058191907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b6111a65760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6111ae61212d565b6111b6612253565b6111bf89612370565b6111c88a6109ce565b6112145760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e740000000000000000000060448201526064016101d8565b600061123760405180606001604052806021815260200161369a60219139611d56565b905060008173ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b8152600401602060405180830381865afa158015611286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112aa919061355a565b90506112bf336112ba8e84613534565b6124a0565b6112cd888b8b8f8b8b612804565b50505050505050505050505050565b6040805160028082526060808301845292600092919060208301908036833701905050905067de0b6b3a764000008160008151811061131d5761131d613573565b602002602001018181525050676f05b59d3b2000008160018151811061134557611345613573565b6020908102919091010152919050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306113a0826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461141a5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f636f6e74726163742e657869737473000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602f82015261146790604301610581565b6114d85760405162461bcd60e51b8152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f726163740000000000000000000000000000000000000000000000000000000060648201526084016101d8565b60006115186040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d56565b6040517fd1afe95800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529192509082169063d1afe95890602401600060405180830381600087803b15801561158557600080fd5b505af1158015611599573d6000803e3d6000fd5b50505050610f1485856124a0565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306115f2826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461166c5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606085901b16602b82015283906116bc90603f01610581565b6117085760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6000349050600061174d6040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff166398ea5fca836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561179757600080fd5b505af11580156117ab573d6000803e3d6000fd5b50506040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff1960608b901b16603082015261181c935060440191506118009050565b60405160208183030381529060405280519060200120836120cb565b60408051838152426020820152339173ffffffffffffffffffffffffffffffffffffffff8916917f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1910160405180910390a3505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306118c1826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461193b5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b3361198e8160405160200161058191907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b6119da5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6000806000348f6119eb9190613534565b905060006119f833610f6c565b90506000611a0533610f1b565b905082611a128284613547565b1015611a605760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e74206372656469740000000000000000000000000060448201526064016101d8565b82935082821015611a7b57611a758284613534565b94508193505b8415611baa576040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b166030820152611ae5906044016040516020818303038152906040528051906020012086612b10565b6000611b256040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611d56565b6040517f3bed33ce0000000000000000000000000000000000000000000000000000000081526004810188905290915073ffffffffffffffffffffffffffffffffffffffff821690633bed33ce90602401600060405180830381600087803b158015611b9057600080fd5b505af1158015611ba4573d6000803e3d6000fd5b50505050505b8315611c14576040517f6e6f64652e6465706f7369742e6372656469742e62616c616e6365000000000060208201526bffffffffffffffffffffffff193360601b16603b820152611c1490604f016040516020818303038152906040528051906020012085612b10565b5050505050610c2f8c8c8c8c8c8c8c8c8c611e6a565b600080546040517f7ae1cfca0000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff1690637ae1cfca90602401602060405180830381865afa158015611c9e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906135a2565b6000546040517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018490526024810183905261010090910473ffffffffffffffffffffffffffffffffffffffff169063e2a4853a906044015b600060405180830381600087803b158015611d3a57600080fd5b505af1158015611d4e573d6000803e3d6000fd5b505050505050565b600080611d6d836040516020016101479190613251565b905073ffffffffffffffffffffffffffffffffffffffff811661046a5760405162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e64000000000000000000000000000060448201526064016101d8565b600080546040517fbd02d0f50000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff169063bd02d0f590602401602060405180830381865afa158015611e46573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a919061355a565b611e72612b72565b611e7a612253565b611e8388612370565b611e8c896109ce565b611ed85760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e740000000000000000000060448201526064016101d8565b6000806000611efe60405180606001604052806021815260200161369a60219139611d56565b90508073ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6f919061355a565b92508073ffffffffffffffffffffffffffffffffffffffff1663d6047def6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe0919061355a565b604080513481524260208201529193503392507f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f888631910160405180910390a261202c336112ba8d85613534565b60006120388585612c94565b9050612044828d612f8c565b8073ffffffffffffffffffffffffffffffffffffffff16633ca742e9838e8d8d8d8d8d6040518863ffffffff1660e01b81526004016120889695949392919061360d565b6000604051808303818588803b1580156120a157600080fd5b505af11580156120b5573d6000803e3d6000fd5b50505050506120c3816130dd565b610c2f61319a565b6000546040517fadb353dc000000000000000000000000000000000000000000000000000000008152600481018490526024810183905261010090910473ffffffffffffffffffffffffffffffffffffffff169063adb353dc90604401611d20565b600061216d6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff166346faa2366040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121de91906135a2565b6122505760405162461bcd60e51b815260206004820152602760248201527f566163616e74206d696e69706f6f6c73206172652063757272656e746c79206460448201527f697361626c65640000000000000000000000000000000000000000000000000060648201526084016101d8565b50565b60006122936040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250611d56565b6040517f927ece4f00000000000000000000000000000000000000000000000000000000815233600482015290915073ffffffffffffffffffffffffffffffffffffffff82169063927ece4f90602401602060405180830381865afa158015612300573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232491906135a2565b6122505760405162461bcd60e51b815260206004820152601f60248201527f466565206469737472696275746f72206e6f7420696e697469616c697365640060448201526064016101d8565b60006123b06040518060400160405280601181526020017f726f636b65744e6574776f726b46656573000000000000000000000000000000815250611d56565b905060008173ffffffffffffffffffffffffffffffffffffffff1663e71501346040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612423919061355a565b90508281101561249b5760405162461bcd60e51b815260206004820152603160248201527f4d696e696d756d206e6f64652066656520657863656564732063757272656e7460448201527f206e6574776f726b206e6f64652066656500000000000000000000000000000060648201526084016101d8565b505050565b60006124e06040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250611d56565b905060006125226040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f747300000000000000000000815250611d56565b6040517fa493e6a200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015291925060009185919085169063a493e6a290602401602060405180830381865afa158015612597573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bb919061355a565b6125c59190613547565b6040517f48aeedf500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152919250908416906348aeedf590602401602060405180830381865afa158015612635573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612659919061355a565b8111156126ce5760405162461bcd60e51b815260206004820152603f60248201527f455448206d617463686564206166746572206465706f7369742065786365656460448201527f73206c696d6974206261736564206f6e206e6f64652052504c207374616b650060648201526084016101d8565b6040517f6574682e6d6174636865642e6e6f64652e616d6f756e7400000000000000000060208201526bffffffffffffffffffffffff19606087901b166037820152600090604b01604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529082905280516020909101207f231e5cde0000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff431660248301527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff84166044830152915073ffffffffffffffffffffffffffffffffffffffff84169063231e5cde90606401600060405180830381600087803b1580156127e457600080fd5b505af11580156127f8573d6000803e3d6000fd5b50505050505050505050565b6000806128456040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d56565b6040517f606bb62e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529192509082169063606bb62e90602401602060405180830381865afa1580156128b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d991906135a2565b15801561297357506040517fa757987a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015282169063a757987a90602401602060405180830381865afa15801561294d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297191906135a2565b155b6129e55760405162461bcd60e51b815260206004820152603360248201527f4d696e69706f6f6c20616c726561647920657869737473206f7220776173207060448201527f726576696f75736c792064657374726f7965640000000000000000000000000060648201526084016101d8565b6040517fa179778b00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff83169063a179778b90612a449033908d908d908d908d908c9060040161364e565b6020604051808303816000875af1158015612a63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a8791906134e8565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612b045760405162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c2061646472657373000000000060448201526064016101d8565b98975050505050505050565b6000546040517febb9d8c9000000000000000000000000000000000000000000000000000000008152600481018490526024810183905261010090910473ffffffffffffffffffffffffffffffffffffffff169063ebb9d8c990604401611d20565b6000612bb26040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff16636ada78476040518163ffffffff1660e01b8152600401602060405180830381865afa158015612bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2391906135a2565b6122505760405162461bcd60e51b8152602060048201526024808201527f4e6f6465206465706f73697473206172652063757272656e746c79206469736160448201527f626c65640000000000000000000000000000000000000000000000000000000060648201526084016101d8565b600080612cd56040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d56565b6040517f606bb62e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529192509082169063606bb62e90602401602060405180830381865afa158015612d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6991906135a2565b158015612e0357506040517fa757987a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015282169063a757987a90602401602060405180830381865afa158015612ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0191906135a2565b155b612e755760405162461bcd60e51b815260206004820152603360248201527f4d696e69706f6f6c20616c726561647920657869737473206f7220776173207060448201527f726576696f75736c792064657374726f7965640000000000000000000000000060648201526084016101d8565b6040517fc64372bb0000000000000000000000000000000000000000000000000000000081523360048201526024810185905260009073ffffffffffffffffffffffffffffffffffffffff83169063c64372bb906044016020604051808303816000875af1158015612eeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f0f91906134e8565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461103a5760405162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c2061646472657373000000000060448201526064016101d8565b6000612fcc6040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d56565b905060008334101561306657612fe23485613534565b6040517f606b64970000000000000000000000000000000000000000000000000000000081526004810182905290915073ffffffffffffffffffffffffffffffffffffffff83169063606b649790602401600060405180830381600087803b15801561304d57600080fd5b505af1158015613061573d6000803e3d6000fd5b505050505b6000846130738334613547565b61307d9190613534565b905073ffffffffffffffffffffffffffffffffffffffff83166322b1751d826130a68888613534565b6040518363ffffffff1660e01b81526004016130c491815260200190565b6000604051808303818588803b1580156127e457600080fd5b61311b6040518060400160405280601381526020017f726f636b65744d696e69706f6f6c517565756500000000000000000000000000815250611d56565b6040517f2f3eb40900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529190911690632f3eb40990602401600060405180830381600087803b15801561318657600080fd5b505af1158015610f14573d6000803e3d6000fd5b60006131da6040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff16633b36f5926040518163ffffffff1660e01b81526004016020604051808303816000875af1158015613229573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324d91906135a2565b5050565b7f636f6e74726163742e616464726573730000000000000000000000000000000081526000825160005b81811015613298576020818601810151601086840101520161327b565b506000920160100191825250919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461225057600080fd5b600080604083850312156132de57600080fd5b82356132e9816132a9565b946020939093013593505050565b60006020828403121561330957600080fd5b8135613314816132a9565b9392505050565b60006020828403121561332d57600080fd5b5035919050565b60008083601f84011261334657600080fd5b50813567ffffffffffffffff81111561335e57600080fd5b60208301915083602082850101111561337657600080fd5b9250929050565b600080600080600080600080600060e08a8c03121561339b57600080fd5b8935985060208a0135975060408a013567ffffffffffffffff808211156133c157600080fd5b6133cd8d838e01613334565b909950975060608c01359150808211156133e657600080fd5b506133f38c828d01613334565b90965094505060808a0135925060a08a0135915060c08a0135613415816132a9565b809150509295985092959850929598565b600080600080600080600060c0888a03121561344157600080fd5b8735965060208801359550604088013567ffffffffffffffff81111561346657600080fd5b6134728a828b01613334565b90965094505060608801359250608088013561348d816132a9565b8092505060a0880135905092959891949750929550565b6020808252825182820181905260009190848201906040850190845b818110156134dc578351835292840192918401916001016134c0565b50909695505050505050565b6000602082840312156134fa57600080fd5b8151613314816132a9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561046a5761046a613505565b8082018082111561046a5761046a613505565b60006020828403121561356c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156135b457600080fd5b8151801515811461331457600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8681526080602082015260006136276080830187896135c4565b828103604084015261363a8186886135c4565b915050826060830152979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a06040820152600061368460a0830186886135c4565b6060830194909452506080015294935050505056fe726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6ca2646970667358221220c8c0c0a54ad5911947206632825bf26869883203b65767df39beed69ff1fe63664736f6c6343000812003300000000000000000000000024503c4f4cefcfa2d3930ec7c8cfd44a78c7a25e

Deployed Bytecode

0x6080604052600436106100f75760003560e01c80636637714e1161008a578063aa5c937411610059578063aa5c93741461038c578063c095415d146101e1578063eee3f07a146103ac578063f5746ee0146103bf57600080fd5b80636637714e1461030a578063940829061461032a57806398913c8d1461034a5780639bed5a451461036a57600080fd5b8063493c9467116100c6578063493c94671461028b57806354fd4d50146102ab578063598d90c5146102d7578063643ff9fe146102ea57600080fd5b80631b9a91a4146101e8578063206b427114610208578063300d9d991461023b5780633ee36db41461026b57600080fd5b366101e3576040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c00000000000000000000000000000081525033610162826040516020016101479190613251565b604051602081830303815290604052805190602001206103d2565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146101e15760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064015b60405180910390fd5b005b600080fd5b3480156101f457600080fd5b506101e16102033660046132cb565b610470565b34801561021457600080fd5b506102286102233660046132f7565b6109b0565b6040519081526020015b60405180910390f35b34801561024757600080fd5b5061025b61025636600461331b565b6109ce565b6040519015158152602001610232565b34801561027757600080fd5b506102286102863660046132f7565b6109ef565b34801561029757600080fd5b506102286102a63660046132f7565b610a03565b3480156102b757600080fd5b506000546102c59060ff1681565b60405160ff9091168152602001610232565b6101e16102e536600461337d565b610a6b565b3480156102f657600080fd5b506101e16103053660046132cb565b610c3d565b34801561031657600080fd5b506102286103253660046132f7565b610f1b565b34801561033657600080fd5b506102286103453660046132f7565b610f6c565b34801561035657600080fd5b506101e1610365366004613426565b611042565b34801561037657600080fd5b5061037f6112dc565b60405161023291906134a4565b34801561039857600080fd5b506101e16103a73660046132cb565b611355565b6101e16103ba3660046132f7565b6115a7565b6101e16103cd36600461337d565b611876565b600080546040517f21f8a7210000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff16906321f8a72190602401602060405180830381865afa158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906134e8565b92915050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306104bb826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105355760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606086901b16602b820152849061059c90603f015b60405160208183030381529060405280519060200120611c2a565b6105e85760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b600080546040517f5b49ff6200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015261010090920490911690635b49ff6290602401602060405180830381865afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068391906134e8565b90503373ffffffffffffffffffffffffffffffffffffffff8216146107105760405162461bcd60e51b815260206004820152602860248201527f4f6e6c79207769746864726177616c20616464726573732063616e207769746860448201527f647261772045544800000000000000000000000000000000000000000000000060648201526084016101d8565b600061071b87610f1b565b90508581101561076d5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e636500000000000000000000000060448201526064016101d8565b6040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff19606089901b1660308201526107dd906044016040516020818303038152906040528051906020012087836107d89190613534565b611cc2565b600061081d6040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611d56565b6040517f3bed33ce0000000000000000000000000000000000000000000000000000000081526004810189905290915073ffffffffffffffffffffffffffffffffffffffff821690633bed33ce90602401600060405180830381600087803b15801561088857600080fd5b505af115801561089c573d6000803e3d6000fd5b5050505060008373ffffffffffffffffffffffffffffffffffffffff168860405160006040518083038185875af1925050503d80600081146108fa576040519150601f19603f3d011682016040523d82523d6000602084013e6108ff565b606091505b50509050806109505760405162461bcd60e51b815260206004820152601660248201527f4661696c656420746f207769746864726177204554480000000000000000000060448201526064016101d8565b6040805189815242602082015273ffffffffffffffffffffffffffffffffffffffff80871692908c16917f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1910160405180910390a3505050505050505050565b60006109bb82610f1b565b6109c483610a03565b61046a9190613547565b60008167de0b6b3a76400000148061046a575050676f05b59d3b2000001490565b60006109fa82610f1b565b6109c483610f6c565b6040517f6e6f64652e6465706f7369742e6372656469742e62616c616e6365000000000060208201526bffffffffffffffffffffffff19606083901b16603b82015260009061046a90604f015b60405160208183030381529060405280519060200120611dd2565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610ab6826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b305760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b33610b838160405160200161058191907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b610bcf5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b8b3414610c1e5760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642076616c75650000000000000000000000000000000000000060448201526064016101d8565b610c2f8c8c8c8c8c8c8c8c8c611e6a565b505050505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f73697400000000000000000000000000000081525030610c88826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d025760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606086901b16602b8201528490610d5290603f01610581565b610d9e5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6040517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602f820152610deb90604301610581565b80610e3e57506040517f636f6e74726163742e657869737473000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602f820152610e3e90604301610581565b610eaf5760405162461bcd60e51b8152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f726163740000000000000000000000000000000000000000000000000000000060648201526084016101d8565b6040517f6e6f64652e6465706f7369742e6372656469742e62616c616e6365000000000060208201526bffffffffffffffffffffffff19606087901b16603b820152610f1490604f0160405160208183030381529060405280519060200120856120cb565b5050505050565b6040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff19606083901b16603082015260009061046a90604401610a50565b600080610fad6040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d56565b905060008173ffffffffffffffffffffffffffffffffffffffff166312065fe06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ffc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611020919061355a565b9050600061102d85610a03565b90508181111561103a5750805b949350505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f7369740000000000000000000000000000008152503061108d826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111075760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b3361115a8160405160200161058191907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b6111a65760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6111ae61212d565b6111b6612253565b6111bf89612370565b6111c88a6109ce565b6112145760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e740000000000000000000060448201526064016101d8565b600061123760405180606001604052806021815260200161369a60219139611d56565b905060008173ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b8152600401602060405180830381865afa158015611286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112aa919061355a565b90506112bf336112ba8e84613534565b6124a0565b6112cd888b8b8f8b8b612804565b50505050505050505050505050565b6040805160028082526060808301845292600092919060208301908036833701905050905067de0b6b3a764000008160008151811061131d5761131d613573565b602002602001018181525050676f05b59d3b2000008160018151811061134557611345613573565b6020908102919091010152919050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306113a0826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461141a5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f636f6e74726163742e657869737473000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602f82015261146790604301610581565b6114d85760405162461bcd60e51b8152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f726163740000000000000000000000000000000000000000000000000000000060648201526084016101d8565b60006115186040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d56565b6040517fd1afe95800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529192509082169063d1afe95890602401600060405180830381600087803b15801561158557600080fd5b505af1158015611599573d6000803e3d6000fd5b50505050610f1485856124a0565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306115f2826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461166c5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606085901b16602b82015283906116bc90603f01610581565b6117085760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6000349050600061174d6040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff166398ea5fca836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561179757600080fd5b505af11580156117ab573d6000803e3d6000fd5b50506040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff1960608b901b16603082015261181c935060440191506118009050565b60405160208183030381529060405280519060200120836120cb565b60408051838152426020820152339173ffffffffffffffffffffffffffffffffffffffff8916917f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1910160405180910390a3505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654465706f736974000000000000000000000000000000815250306118c1826040516020016101479190613251565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461193b5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e74726163740000000060448201526064016101d8565b3361198e8160405160200161058191907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b6119da5760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064016101d8565b6000806000348f6119eb9190613534565b905060006119f833610f6c565b90506000611a0533610f1b565b905082611a128284613547565b1015611a605760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e74206372656469740000000000000000000000000060448201526064016101d8565b82935082821015611a7b57611a758284613534565b94508193505b8415611baa576040517f6e6f64652e6574682e62616c616e63650000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b166030820152611ae5906044016040516020818303038152906040528051906020012086612b10565b6000611b256040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611d56565b6040517f3bed33ce0000000000000000000000000000000000000000000000000000000081526004810188905290915073ffffffffffffffffffffffffffffffffffffffff821690633bed33ce90602401600060405180830381600087803b158015611b9057600080fd5b505af1158015611ba4573d6000803e3d6000fd5b50505050505b8315611c14576040517f6e6f64652e6465706f7369742e6372656469742e62616c616e6365000000000060208201526bffffffffffffffffffffffff193360601b16603b820152611c1490604f016040516020818303038152906040528051906020012085612b10565b5050505050610c2f8c8c8c8c8c8c8c8c8c611e6a565b600080546040517f7ae1cfca0000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff1690637ae1cfca90602401602060405180830381865afa158015611c9e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a91906135a2565b6000546040517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018490526024810183905261010090910473ffffffffffffffffffffffffffffffffffffffff169063e2a4853a906044015b600060405180830381600087803b158015611d3a57600080fd5b505af1158015611d4e573d6000803e3d6000fd5b505050505050565b600080611d6d836040516020016101479190613251565b905073ffffffffffffffffffffffffffffffffffffffff811661046a5760405162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e64000000000000000000000000000060448201526064016101d8565b600080546040517fbd02d0f50000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff169063bd02d0f590602401602060405180830381865afa158015611e46573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a919061355a565b611e72612b72565b611e7a612253565b611e8388612370565b611e8c896109ce565b611ed85760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206465706f73697420616d6f756e740000000000000000000060448201526064016101d8565b6000806000611efe60405180606001604052806021815260200161369a60219139611d56565b90508073ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6f919061355a565b92508073ffffffffffffffffffffffffffffffffffffffff1663d6047def6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe0919061355a565b604080513481524260208201529193503392507f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f888631910160405180910390a261202c336112ba8d85613534565b60006120388585612c94565b9050612044828d612f8c565b8073ffffffffffffffffffffffffffffffffffffffff16633ca742e9838e8d8d8d8d8d6040518863ffffffff1660e01b81526004016120889695949392919061360d565b6000604051808303818588803b1580156120a157600080fd5b505af11580156120b5573d6000803e3d6000fd5b50505050506120c3816130dd565b610c2f61319a565b6000546040517fadb353dc000000000000000000000000000000000000000000000000000000008152600481018490526024810183905261010090910473ffffffffffffffffffffffffffffffffffffffff169063adb353dc90604401611d20565b600061216d6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff166346faa2366040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121de91906135a2565b6122505760405162461bcd60e51b815260206004820152602760248201527f566163616e74206d696e69706f6f6c73206172652063757272656e746c79206460448201527f697361626c65640000000000000000000000000000000000000000000000000060648201526084016101d8565b50565b60006122936040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250611d56565b6040517f927ece4f00000000000000000000000000000000000000000000000000000000815233600482015290915073ffffffffffffffffffffffffffffffffffffffff82169063927ece4f90602401602060405180830381865afa158015612300573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232491906135a2565b6122505760405162461bcd60e51b815260206004820152601f60248201527f466565206469737472696275746f72206e6f7420696e697469616c697365640060448201526064016101d8565b60006123b06040518060400160405280601181526020017f726f636b65744e6574776f726b46656573000000000000000000000000000000815250611d56565b905060008173ffffffffffffffffffffffffffffffffffffffff1663e71501346040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612423919061355a565b90508281101561249b5760405162461bcd60e51b815260206004820152603160248201527f4d696e696d756d206e6f64652066656520657863656564732063757272656e7460448201527f206e6574776f726b206e6f64652066656500000000000000000000000000000060648201526084016101d8565b505050565b60006124e06040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250611d56565b905060006125226040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f747300000000000000000000815250611d56565b6040517fa493e6a200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015291925060009185919085169063a493e6a290602401602060405180830381865afa158015612597573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125bb919061355a565b6125c59190613547565b6040517f48aeedf500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152919250908416906348aeedf590602401602060405180830381865afa158015612635573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612659919061355a565b8111156126ce5760405162461bcd60e51b815260206004820152603f60248201527f455448206d617463686564206166746572206465706f7369742065786365656460448201527f73206c696d6974206261736564206f6e206e6f64652052504c207374616b650060648201526084016101d8565b6040517f6574682e6d6174636865642e6e6f64652e616d6f756e7400000000000000000060208201526bffffffffffffffffffffffff19606087901b166037820152600090604b01604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529082905280516020909101207f231e5cde0000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff431660248301527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff84166044830152915073ffffffffffffffffffffffffffffffffffffffff84169063231e5cde90606401600060405180830381600087803b1580156127e457600080fd5b505af11580156127f8573d6000803e3d6000fd5b50505050505050505050565b6000806128456040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d56565b6040517f606bb62e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529192509082169063606bb62e90602401602060405180830381865afa1580156128b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d991906135a2565b15801561297357506040517fa757987a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015282169063a757987a90602401602060405180830381865afa15801561294d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297191906135a2565b155b6129e55760405162461bcd60e51b815260206004820152603360248201527f4d696e69706f6f6c20616c726561647920657869737473206f7220776173207060448201527f726576696f75736c792064657374726f7965640000000000000000000000000060648201526084016101d8565b6040517fa179778b00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff83169063a179778b90612a449033908d908d908d908d908c9060040161364e565b6020604051808303816000875af1158015612a63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a8791906134e8565b90508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612b045760405162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c2061646472657373000000000060448201526064016101d8565b98975050505050505050565b6000546040517febb9d8c9000000000000000000000000000000000000000000000000000000008152600481018490526024810183905261010090910473ffffffffffffffffffffffffffffffffffffffff169063ebb9d8c990604401611d20565b6000612bb26040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff16636ada78476040518163ffffffff1660e01b8152600401602060405180830381865afa158015612bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2391906135a2565b6122505760405162461bcd60e51b8152602060048201526024808201527f4e6f6465206465706f73697473206172652063757272656e746c79206469736160448201527f626c65640000000000000000000000000000000000000000000000000000000060648201526084016101d8565b600080612cd56040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250611d56565b6040517f606bb62e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529192509082169063606bb62e90602401602060405180830381865afa158015612d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6991906135a2565b158015612e0357506040517fa757987a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015282169063a757987a90602401602060405180830381865afa158015612ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0191906135a2565b155b612e755760405162461bcd60e51b815260206004820152603360248201527f4d696e69706f6f6c20616c726561647920657869737473206f7220776173207060448201527f726576696f75736c792064657374726f7965640000000000000000000000000060648201526084016101d8565b6040517fc64372bb0000000000000000000000000000000000000000000000000000000081523360048201526024810185905260009073ffffffffffffffffffffffffffffffffffffffff83169063c64372bb906044016020604051808303816000875af1158015612eeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f0f91906134e8565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461103a5760405162461bcd60e51b815260206004820152601b60248201527f556e6578706563746564206d696e69706f6f6c2061646472657373000000000060448201526064016101d8565b6000612fcc6040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d56565b905060008334101561306657612fe23485613534565b6040517f606b64970000000000000000000000000000000000000000000000000000000081526004810182905290915073ffffffffffffffffffffffffffffffffffffffff83169063606b649790602401600060405180830381600087803b15801561304d57600080fd5b505af1158015613061573d6000803e3d6000fd5b505050505b6000846130738334613547565b61307d9190613534565b905073ffffffffffffffffffffffffffffffffffffffff83166322b1751d826130a68888613534565b6040518363ffffffff1660e01b81526004016130c491815260200190565b6000604051808303818588803b1580156127e457600080fd5b61311b6040518060400160405280601381526020017f726f636b65744d696e69706f6f6c517565756500000000000000000000000000815250611d56565b6040517f2f3eb40900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529190911690632f3eb40990602401600060405180830381600087803b15801561318657600080fd5b505af1158015610f14573d6000803e3d6000fd5b60006131da6040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611d56565b90508073ffffffffffffffffffffffffffffffffffffffff16633b36f5926040518163ffffffff1660e01b81526004016020604051808303816000875af1158015613229573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324d91906135a2565b5050565b7f636f6e74726163742e616464726573730000000000000000000000000000000081526000825160005b81811015613298576020818601810151601086840101520161327b565b506000920160100191825250919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461225057600080fd5b600080604083850312156132de57600080fd5b82356132e9816132a9565b946020939093013593505050565b60006020828403121561330957600080fd5b8135613314816132a9565b9392505050565b60006020828403121561332d57600080fd5b5035919050565b60008083601f84011261334657600080fd5b50813567ffffffffffffffff81111561335e57600080fd5b60208301915083602082850101111561337657600080fd5b9250929050565b600080600080600080600080600060e08a8c03121561339b57600080fd5b8935985060208a0135975060408a013567ffffffffffffffff808211156133c157600080fd5b6133cd8d838e01613334565b909950975060608c01359150808211156133e657600080fd5b506133f38c828d01613334565b90965094505060808a0135925060a08a0135915060c08a0135613415816132a9565b809150509295985092959850929598565b600080600080600080600060c0888a03121561344157600080fd5b8735965060208801359550604088013567ffffffffffffffff81111561346657600080fd5b6134728a828b01613334565b90965094505060608801359250608088013561348d816132a9565b8092505060a0880135905092959891949750929550565b6020808252825182820181905260009190848201906040850190845b818110156134dc578351835292840192918401916001016134c0565b50909695505050505050565b6000602082840312156134fa57600080fd5b8151613314816132a9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561046a5761046a613505565b8082018082111561046a5761046a613505565b60006020828403121561356c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156135b457600080fd5b8151801515811461331457600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8681526080602082015260006136276080830187896135c4565b828103604084015261363a8186886135c4565b915050826060830152979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a06040820152600061368460a0830186886135c4565b6060830194909452506080015294935050505056fe726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6ca2646970667358221220c8c0c0a54ad5911947206632825bf26869883203b65767df39beed69ff1fe63664736f6c63430008120033

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

00000000000000000000000024503C4f4CEfCfa2d3930Ec7C8CFD44a78c7a25E

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000024503C4f4CEfCfa2d3930Ec7C8CFD44a78c7a25E


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.