ETH Price: $2,427.58 (-2.52%)

Contract

0x84D11B65E026F7aA08F5497dd3593fb083410B71
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040153427192022-08-14 23:45:02785 days ago1660520702IN
 Create: RocketMinipoolManager
0 ETH0.0451053410

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RocketMinipoolManager

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 15000 runs

Other Settings:
default evmVersion, GNU GPLv3 license
File 1 of 25 : RocketMinipoolManager.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.7.6;
pragma abicoder v2;

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

import "@openzeppelin/contracts/math/SafeMath.sol";

import "./RocketMinipool.sol";
import "../RocketBase.sol";
import "../../types/MinipoolStatus.sol";
import "../../types/MinipoolDeposit.sol";
import "../../types/MinipoolDetails.sol";
import "../../interface/dao/node/RocketDAONodeTrustedInterface.sol";
import "../../interface/minipool/RocketMinipoolInterface.sol";
import "../../interface/minipool/RocketMinipoolManagerInterface.sol";
import "../../interface/minipool/RocketMinipoolQueueInterface.sol";
import "../../interface/node/RocketNodeStakingInterface.sol";
import "../../interface/util/AddressSetStorageInterface.sol";
import "../../interface/node/RocketNodeManagerInterface.sol";
import "../../interface/network/RocketNetworkPricesInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol";
import "../../interface/minipool/RocketMinipoolFactoryInterface.sol";
import "../../interface/node/RocketNodeDistributorFactoryInterface.sol";
import "../../interface/node/RocketNodeDistributorInterface.sol";
import "../../interface/network/RocketNetworkPenaltiesInterface.sol";
import "../../interface/minipool/RocketMinipoolPenaltyInterface.sol";

// Minipool creation, removal and management

contract RocketMinipoolManager is RocketBase, RocketMinipoolManagerInterface {

    // Libs
    using SafeMath for uint;

    // Events
    event MinipoolCreated(address indexed minipool, address indexed node, uint256 time);
    event MinipoolDestroyed(address indexed minipool, address indexed node, uint256 time);

    // Construct
    constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
        version = 2;
    }

    // Get the number of minipools in the network
    function getMinipoolCount() override public view returns (uint256) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        return addressSetStorage.getCount(keccak256(bytes("minipools.index")));
    }

    // Get the number of minipools in the network in the Staking state
    function getStakingMinipoolCount() override external view returns (uint256) {
        return getUint(keccak256(bytes("minipools.staking.count")));
    }

    // Get the number of finalised minipools in the network
    function getFinalisedMinipoolCount() override external view returns (uint256) {
        return getUint(keccak256(bytes("minipools.finalised.count")));
    }

    // Get the number of active minipools in the network
    function getActiveMinipoolCount() override public view returns (uint256) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        uint256 total = addressSetStorage.getCount(keccak256(bytes("minipools.index")));
        uint256 finalised = getUint(keccak256(bytes("minipools.finalised.count")));
        return total.sub(finalised);
    }

    // Get the number of minipools in each status.
    // Returns the counts for Initialised, Prelaunch, Staking, Withdrawable, and Dissolved in that order.
    function getMinipoolCountPerStatus(uint256 _offset, uint256 _limit) override external view
    returns (uint256 initialisedCount, uint256 prelaunchCount, uint256 stakingCount, uint256 withdrawableCount, uint256 dissolvedCount) {
        // Get contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Precompute minipool key
        bytes32 minipoolKey = keccak256(abi.encodePacked("minipools.index"));
        // Iterate over the requested minipool range
        uint256 totalMinipools = getMinipoolCount();
        uint256 max = _offset.add(_limit);
        if (max > totalMinipools || _limit == 0) { max = totalMinipools; }
        for (uint256 i = _offset; i < max; i++) {
            // Get the minipool at index i
            RocketMinipoolInterface minipool = RocketMinipoolInterface(addressSetStorage.getItem(minipoolKey, i));
            // Get the minipool's status, and update the appropriate counter
            MinipoolStatus status = minipool.getStatus();
            if (status == MinipoolStatus.Initialised) {
                initialisedCount++;
            }
            else if (status == MinipoolStatus.Prelaunch) {
                prelaunchCount++;
            }
            else if (status == MinipoolStatus.Staking) {
                stakingCount++;
            }
            else if (status == MinipoolStatus.Withdrawable) {
                withdrawableCount++;
            }
            else if (status == MinipoolStatus.Dissolved) {
                dissolvedCount++;
            }
        }
    }

    // Returns an array of all minipools in the prelaunch state
    function getPrelaunchMinipools(uint256 offset, uint256 limit) override external view
    returns (address[] memory) {
        // Get contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Precompute minipool key
        bytes32 minipoolKey = keccak256(abi.encodePacked("minipools.index"));
        // Iterate over the requested minipool range
        uint256 totalMinipools = getMinipoolCount();
        uint256 max = offset.add(limit);
        if (max > totalMinipools || limit == 0) { max = totalMinipools; }
        // Create array big enough for every minipool
        address[] memory minipools = new address[](max.sub(offset));
        uint256 total = 0;
        for (uint256 i = offset; i < max; i++) {
            // Get the minipool at index i
            RocketMinipoolInterface minipool = RocketMinipoolInterface(addressSetStorage.getItem(minipoolKey, i));
            // Get the minipool's status, and to array if it's in prelaunch
            MinipoolStatus status = minipool.getStatus();
            if (status == MinipoolStatus.Prelaunch) {
                minipools[total] = address(minipool);
                total++;
            }
        }
        // Dirty hack to cut unused elements off end of return value
        assembly {
            mstore(minipools, total)
        }
        return minipools;
    }

    // Get a network minipool address by index
    function getMinipoolAt(uint256 _index) override external view returns (address) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        return addressSetStorage.getItem(keccak256(abi.encodePacked("minipools.index")), _index);
    }

    // Get the number of minipools owned by a node
    function getNodeMinipoolCount(address _nodeAddress) override external view returns (uint256) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        return addressSetStorage.getCount(keccak256(abi.encodePacked("node.minipools.index", _nodeAddress)));
    }

    // Get the number of minipools owned by a node that are not finalised
    function getNodeActiveMinipoolCount(address _nodeAddress) override public view returns (uint256) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        uint256 finalised = getUint(keccak256(abi.encodePacked("node.minipools.finalised.count", _nodeAddress)));
        uint256 total = addressSetStorage.getCount(keccak256(abi.encodePacked("node.minipools.index", _nodeAddress)));
        return total.sub(finalised);
    }

    // Get the number of minipools owned by a node that are finalised
    function getNodeFinalisedMinipoolCount(address _nodeAddress) override external view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.minipools.finalised.count", _nodeAddress)));
    }

    // Get the number of minipools owned by a node that are in staking status
    function getNodeStakingMinipoolCount(address _nodeAddress) override external view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.minipools.staking.count", _nodeAddress)));
    }

    // Get a node minipool address by index
    function getNodeMinipoolAt(address _nodeAddress, uint256 _index) override external view returns (address) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        return addressSetStorage.getItem(keccak256(abi.encodePacked("node.minipools.index", _nodeAddress)), _index);
    }

    // Get the number of validating minipools owned by a node
    function getNodeValidatingMinipoolCount(address _nodeAddress) override external view returns (uint256) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        return addressSetStorage.getCount(keccak256(abi.encodePacked("node.minipools.validating.index", _nodeAddress)));
    }

    // Get a validating node minipool address by index
    function getNodeValidatingMinipoolAt(address _nodeAddress, uint256 _index) override external view returns (address) {
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        return addressSetStorage.getItem(keccak256(abi.encodePacked("node.minipools.validating.index", _nodeAddress)), _index);
    }

    // Get a minipool address by validator pubkey
    function getMinipoolByPubkey(bytes memory _pubkey) override public view returns (address) {
        return getAddress(keccak256(abi.encodePacked("validator.minipool", _pubkey)));
    }

    // Check whether a minipool exists
    function getMinipoolExists(address _minipoolAddress) override public view returns (bool) {
        return getBool(keccak256(abi.encodePacked("minipool.exists", _minipoolAddress)));
    }

    // Check whether a minipool previously existed at the given address
    function getMinipoolDestroyed(address _minipoolAddress) override external view returns (bool) {
        return getBool(keccak256(abi.encodePacked("minipool.destroyed", _minipoolAddress)));
    }

    // Get a minipool's validator pubkey
    function getMinipoolPubkey(address _minipoolAddress) override public view returns (bytes memory) {
        return getBytes(keccak256(abi.encodePacked("minipool.pubkey", _minipoolAddress)));
    }

    // Get the withdrawal credentials for the minipool contract
    function getMinipoolWithdrawalCredentials(address _minipoolAddress) override public pure returns (bytes memory) {
        return abi.encodePacked(byte(0x01), bytes11(0x0), address(_minipoolAddress));
    }

    // Increments _nodeAddress' number of minipools in staking status
    function incrementNodeStakingMinipoolCount(address _nodeAddress) override external onlyLatestContract("rocketMinipoolManager", address(this)) onlyRegisteredMinipool(msg.sender) {
        // Get contracts
        RocketMinipoolInterface minipool = RocketMinipoolInterface(msg.sender);
        // Try to distribute current fees at previous average commission rate
        _tryDistribute(_nodeAddress);
        // Update the node specific count
        bytes32 nodeKey = keccak256(abi.encodePacked("node.minipools.staking.count", _nodeAddress));
        uint256 nodeValue = getUint(nodeKey);
        setUint(nodeKey, nodeValue.add(1));
        // Update the total count
        bytes32 totalKey = keccak256(abi.encodePacked("minipools.staking.count"));
        uint256 totalValue = getUint(totalKey);
        setUint(totalKey, totalValue.add(1));
        // Update total effective stake
        updateTotalEffectiveRPLStake(_nodeAddress, nodeValue, nodeValue.add(1));
        // Update node fee average
        addUint(keccak256(abi.encodePacked("node.average.fee.numerator", _nodeAddress)), minipool.getNodeFee());
    }

    // Decrements _nodeAddress' number of minipools in staking status
    function decrementNodeStakingMinipoolCount(address _nodeAddress) override external onlyLatestContract("rocketMinipoolManager", address(this)) onlyRegisteredMinipool(msg.sender) {
        // Get contracts
        RocketMinipoolInterface minipool = RocketMinipoolInterface(msg.sender);
        // Try to distribute current fees at previous average commission rate
        _tryDistribute(_nodeAddress);
        // Update the node specific count
        bytes32 nodeKey = keccak256(abi.encodePacked("node.minipools.staking.count", _nodeAddress));
        uint256 nodeValue = getUint(nodeKey);
        setUint(nodeKey, nodeValue.sub(1));
        // Update the total count
        bytes32 totalKey = keccak256(abi.encodePacked("minipools.staking.count"));
        uint256 totalValue = getUint(totalKey);
        setUint(totalKey, totalValue.sub(1));
        // Update total effective stake
        updateTotalEffectiveRPLStake(_nodeAddress, nodeValue, nodeValue.sub(1));
        // Update node fee average
        subUint(keccak256(abi.encodePacked("node.average.fee.numerator", _nodeAddress)), minipool.getNodeFee());
    }

    // Calls distribute on the given node's distributor if it has a balance and has been initialised
    function _tryDistribute(address _nodeAddress) internal {
        // Get contracts
        RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory"));
        address distributorAddress = rocketNodeDistributorFactory.getProxyAddress(_nodeAddress);
        // If there are funds to distribute than call distribute
        if (distributorAddress.balance > 0) {
            // Get contracts
            RocketNodeManagerInterface rocketNodeManager = RocketNodeManagerInterface(getContractAddress("rocketNodeManager"));
            // Ensure distributor has been initialised
            require(rocketNodeManager.getFeeDistributorInitialised(_nodeAddress), "Distributor not initialised");
            RocketNodeDistributorInterface distributor = RocketNodeDistributorInterface(distributorAddress);
            distributor.distribute();
        }
    }

    // Increments _nodeAddress' number of minipools that have been finalised
    function incrementNodeFinalisedMinipoolCount(address _nodeAddress) override external onlyLatestContract("rocketMinipoolManager", address(this)) onlyRegisteredMinipool(msg.sender) {
        // Update the node specific count
        addUint(keccak256(abi.encodePacked("node.minipools.finalised.count", _nodeAddress)), 1);
        // Update the total count
        addUint(keccak256(bytes("minipools.finalised.count")), 1);
    }

    // Create a minipool
    // Only accepts calls from the RocketNodeDeposit contract
    function createMinipool(address _nodeAddress, MinipoolDeposit _depositType, uint256 _salt) override external onlyLatestContract("rocketMinipoolManager", address(this)) onlyLatestContract("rocketNodeDeposit", msg.sender) returns (RocketMinipoolInterface) {
        // Load contracts
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Check node minipool limit based on RPL stake
        require(
            getNodeActiveMinipoolCount(_nodeAddress) < rocketNodeStaking.getNodeMinipoolLimit(_nodeAddress),
            "Minipool count after deposit exceeds limit based on node RPL stake"
        );
        { // Local scope to prevent stack too deep error
          RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
          // Check global minipool limit
          uint256 totalMinipoolCount = getActiveMinipoolCount();
          require(totalMinipoolCount.add(1) <= rocketDAOProtocolSettingsMinipool.getMaximumCount(), "Global minipool limit reached");
        }
        // Create minipool contract
        address contractAddress = deployContract(_nodeAddress, _depositType, _salt);
        // Initialize minipool data
        setBool(keccak256(abi.encodePacked("minipool.exists", contractAddress)), true);
        // Add minipool to indexes
        addressSetStorage.addItem(keccak256(abi.encodePacked("minipools.index")), contractAddress);
        addressSetStorage.addItem(keccak256(abi.encodePacked("node.minipools.index", _nodeAddress)), contractAddress);
        // Update unbonded validator count if minipool is unbonded
        if (_depositType == MinipoolDeposit.Empty) {
            RocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted"));
            rocketDAONodeTrusted.incrementMemberUnbondedValidatorCount(_nodeAddress);
        }
        // Emit minipool created event
        emit MinipoolCreated(contractAddress, _nodeAddress, block.timestamp);
        // Add minipool to queue
        RocketMinipoolQueueInterface(getContractAddress("rocketMinipoolQueue")).enqueueMinipool(_depositType, contractAddress);
        // Return created minipool address
        return RocketMinipoolInterface(contractAddress);
    }

    // Destroy a minipool
    // Only accepts calls from registered minipools
    function destroyMinipool() override external onlyLatestContract("rocketMinipoolManager", address(this)) onlyRegisteredMinipool(msg.sender) {
        // Load contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Initialize minipool & get properties
        RocketMinipoolInterface minipool = RocketMinipoolInterface(msg.sender);
        address nodeAddress = minipool.getNodeAddress();
        // Update minipool data
        setBool(keccak256(abi.encodePacked("minipool.exists", msg.sender)), false);
        // Record minipool as destroyed to prevent recreation at same address
        setBool(keccak256(abi.encodePacked("minipool.destroyed", msg.sender)), true);
        // Remove minipool from indexes
        addressSetStorage.removeItem(keccak256(abi.encodePacked("minipools.index")), msg.sender);
        addressSetStorage.removeItem(keccak256(abi.encodePacked("node.minipools.index", nodeAddress)), msg.sender);
        // Clean up pubkey state
        bytes memory pubkey = getMinipoolPubkey(msg.sender);
        deleteBytes(keccak256(abi.encodePacked("minipool.pubkey", msg.sender)));
        deleteAddress(keccak256(abi.encodePacked("validator.minipool", pubkey)));
        // Emit minipool destroyed event
        emit MinipoolDestroyed(msg.sender, nodeAddress, block.timestamp);
    }

    // Updates the stored total effective rate based on a node's changing minipool count
    function updateTotalEffectiveRPLStake(address _nodeAddress, uint256 _oldCount, uint256 _newCount) private {
        // Load contracts
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        // Require price consensus
        require(rocketNetworkPrices.inConsensus(), "Network is not in consensus");
        // Get node's RPL stake
        uint256 rplStake = rocketNodeStaking.getNodeRPLStake(_nodeAddress);
        // Get the node's maximum possible stake
        uint256 maxRplStakePerMinipool = rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
            .mul(rocketDAOProtocolSettingsNode.getMaximumPerMinipoolStake());
        uint256 oldMaxRplStake = maxRplStakePerMinipool
            .mul(_oldCount)
            .div(rocketNetworkPrices.getRPLPrice());
        uint256 newMaxRplStake = maxRplStakePerMinipool
            .mul(_newCount)
            .div(rocketNetworkPrices.getRPLPrice());
        // Check if we have to decrease total
        if (_oldCount > _newCount) {
            if (rplStake <= newMaxRplStake) {
                return;
            }
            uint256 decrease = oldMaxRplStake.sub(newMaxRplStake);
            uint256 delta = rplStake.sub(newMaxRplStake);
            if (delta > decrease) { delta = decrease; }
            rocketNetworkPrices.decreaseEffectiveRPLStake(delta);
            return;
        }
        // Check if we have to increase total
        if (_newCount > _oldCount) {
            if (rplStake <= oldMaxRplStake) {
                return;
            }
            uint256 increase = newMaxRplStake.sub(oldMaxRplStake);
            uint256 delta = rplStake.sub(oldMaxRplStake);
            if (delta > increase) { delta = increase; }
            rocketNetworkPrices.increaseEffectiveRPLStake(delta);
            return;
        }
        // _oldCount == _newCount (do nothing but shouldn't happen)
    }

    // Set a minipool's validator pubkey
    // Only accepts calls from registered minipools
    function setMinipoolPubkey(bytes calldata _pubkey) override external onlyLatestContract("rocketMinipoolManager", address(this)) onlyRegisteredMinipool(msg.sender) {
        // Load contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Initialize minipool & get properties
        RocketMinipoolInterface minipool = RocketMinipoolInterface(msg.sender);
        address nodeAddress = minipool.getNodeAddress();
        // Set minipool validator pubkey & validator minipool address
        setBytes(keccak256(abi.encodePacked("minipool.pubkey", msg.sender)), _pubkey);
        setAddress(keccak256(abi.encodePacked("validator.minipool", _pubkey)), msg.sender);
        // Add minipool to node validating minipools index
        addressSetStorage.addItem(keccak256(abi.encodePacked("node.minipools.validating.index", nodeAddress)), msg.sender);
    }

    // Performs a CREATE2 deployment of a minipool contract with given salt
    function deployContract(address _nodeAddress, MinipoolDeposit _depositType, uint256 _salt) private returns (address) {
        RocketMinipoolFactoryInterface rocketMinipoolFactory = RocketMinipoolFactoryInterface(getContractAddress("rocketMinipoolFactory"));
        return rocketMinipoolFactory.deployContract(_nodeAddress, _depositType, _salt);
    }

    // Retrieves all on-chain information about a given minipool in a single convenience view function
    function getMinipoolDetails(address _minipoolAddress) override external view returns (MinipoolDetails memory) {
        // Get contracts
        RocketMinipoolInterface minipoolInterface = RocketMinipoolInterface(_minipoolAddress);
        RocketMinipool minipool = RocketMinipool(payable(_minipoolAddress));
        RocketNetworkPenaltiesInterface rocketNetworkPenalties = RocketNetworkPenaltiesInterface(getContractAddress("rocketNetworkPenalties"));
        RocketMinipoolPenaltyInterface rocketMinipoolPenalty = RocketMinipoolPenaltyInterface(getContractAddress("rocketMinipoolPenalty"));
        // Minipool details
        MinipoolDetails memory details;
        details.exists = getMinipoolExists(_minipoolAddress);
        details.pubkey = getMinipoolPubkey(_minipoolAddress);
        details.status = minipoolInterface.getStatus();
        details.statusBlock = minipoolInterface.getStatusBlock();
        details.statusTime = minipoolInterface.getStatusTime();
        details.finalised = minipoolInterface.getFinalised();
        details.depositType = minipoolInterface.getDepositType();
        details.nodeFee = minipoolInterface.getNodeFee();
        details.nodeDepositBalance = minipoolInterface.getNodeDepositBalance();
        details.nodeDepositAssigned = minipoolInterface.getNodeDepositAssigned();
        details.userDepositBalance = minipoolInterface.getUserDepositBalance();
        details.userDepositAssigned = minipoolInterface.getUserDepositAssigned();
        details.userDepositAssignedTime = minipoolInterface.getUserDepositAssignedTime();
        // Delegate details
        details.useLatestDelegate = minipool.getUseLatestDelegate();
        details.delegate = minipool.getDelegate();
        details.previousDelegate = minipool.getPreviousDelegate();
        details.effectiveDelegate = minipool.getEffectiveDelegate();
        // Penalty details
        details.penaltyCount = rocketNetworkPenalties.getPenaltyCount(_minipoolAddress);
        details.penaltyRate = rocketMinipoolPenalty.getPenaltyRate(_minipoolAddress);
        return details;
    }
}

File 2 of 25 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 3 of 25 : 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.7.6;

// 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(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 25 : RocketMinipool.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.7.6;

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

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

// An individual minipool in the Rocket Pool network

contract RocketMinipool is RocketMinipoolStorageLayout {

    // Events
    event EtherReceived(address indexed from, uint256 amount, uint256 time);
    event DelegateUpgraded(address oldDelegate, address newDelegate, uint256 time);
    event DelegateRolledBack(address oldDelegate, address newDelegate, uint256 time);

    // Modifiers

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

    // Construct
    constructor(RocketStorageInterface _rocketStorageAddress, address _nodeAddress, MinipoolDeposit _depositType) {
        // Initialise RocketStorage
        require(address(_rocketStorageAddress) != address(0x0), "Invalid storage address");
        rocketStorage = RocketStorageInterface(_rocketStorageAddress);
        // Set storage state to uninitialised
        storageState = StorageState.Uninitialised;
        // Set the current delegate
        address delegateAddress = getContractAddress("rocketMinipoolDelegate");
        rocketMinipoolDelegate = delegateAddress;
        // Check for contract existence
        require(contractExists(delegateAddress), "Delegate contract does not exist");
        // Call initialise on delegate
        (bool success, bytes memory data) = delegateAddress.delegatecall(abi.encodeWithSignature('initialise(address,uint8)', _nodeAddress, uint8(_depositType)));
        if (!success) { revert(getRevertMessage(data)); }
    }

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

    // Upgrade this minipool to the latest network delegate contract
    function delegateUpgrade() external onlyMinipoolOwner {
        // Set previous address
        rocketMinipoolDelegatePrev = rocketMinipoolDelegate;
        // Set new delegate
        rocketMinipoolDelegate = getContractAddress("rocketMinipoolDelegate");
        // Verify
        require(rocketMinipoolDelegate != rocketMinipoolDelegatePrev, "New delegate is the same as the existing one");
        // Log event
        emit DelegateUpgraded(rocketMinipoolDelegatePrev, rocketMinipoolDelegate, block.timestamp);
    }

    // Rollback to previous delegate contract
    function delegateRollback() external onlyMinipoolOwner {
        // Make sure they have upgraded before
        require(rocketMinipoolDelegatePrev != address(0x0), "Previous delegate contract is not set");
        // Store original
        address originalDelegate = rocketMinipoolDelegate;
        // Update delegate to previous and zero out previous
        rocketMinipoolDelegate = rocketMinipoolDelegatePrev;
        rocketMinipoolDelegatePrev = address(0x0);
        // Log event
        emit DelegateRolledBack(originalDelegate, rocketMinipoolDelegate, block.timestamp);
    }

    // If set to true, will automatically use the latest delegate contract
    function setUseLatestDelegate(bool _setting) external onlyMinipoolOwner {
        useLatestDelegate = _setting;
    }

    // Getter for useLatestDelegate setting
    function getUseLatestDelegate() external view returns (bool) {
        return useLatestDelegate;
    }

    // Returns the address of the minipool's stored delegate
    function getDelegate() external view returns (address) {
        return rocketMinipoolDelegate;
    }

    // Returns the address of the minipool's previous delegate (or address(0) if not set)
    function getPreviousDelegate() external view returns (address) {
        return rocketMinipoolDelegatePrev;
    }

    // Returns the delegate which will be used when calling this minipool taking into account useLatestDelegate setting
    function getEffectiveDelegate() external view returns (address) {
        return useLatestDelegate ? getContractAddress("rocketMinipoolDelegate") : rocketMinipoolDelegate;
    }

    // Delegate all other calls to minipool delegate contract
    fallback(bytes calldata _input) external payable returns (bytes memory) {
        // If useLatestDelegate is set, use the latest delegate contract
        address delegateContract = useLatestDelegate ? getContractAddress("rocketMinipoolDelegate") : rocketMinipoolDelegate;
        // Check for contract existence
        require(contractExists(delegateContract), "Delegate contract does not exist");
        // Execute delegatecall
        (bool success, bytes memory data) = delegateContract.delegatecall(_input);
        if (!success) { revert(getRevertMessage(data)); }
        return data;
    }

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

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

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

File 5 of 25 : RocketMinipoolStorageLayout.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.7.6;

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

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

// The RocketMinipool contract storage layout, shared by RocketMinipoolDelegate

// ******************************************************
// Note: This contract MUST NOT BE UPDATED after launch.
// All deployed minipool contracts must maintain a
// Consistent storage layout with RocketMinipoolDelegate.
// ******************************************************

abstract contract RocketMinipoolStorageLayout {
    // Storage state enum
    enum StorageState {
        Undefined,
        Uninitialised,
        Initialised
    }

	// Main Rocket Pool storage contract
    RocketStorageInterface internal rocketStorage = RocketStorageInterface(0);

    // Status
    MinipoolStatus internal status;
    uint256 internal statusBlock;
    uint256 internal statusTime;
    uint256 internal withdrawalBlock;

    // Deposit type
    MinipoolDeposit internal depositType;

    // Node details
    address internal nodeAddress;
    uint256 internal nodeFee;
    uint256 internal nodeDepositBalance;
    bool internal nodeDepositAssigned;
    uint256 internal nodeRefundBalance;
    uint256 internal nodeSlashBalance;

    // User deposit details
    uint256 internal userDepositBalance;
    uint256 internal userDepositAssignedTime;

    // Upgrade options
    bool internal useLatestDelegate = false;
    address internal rocketMinipoolDelegate;
    address internal rocketMinipoolDelegatePrev;

    // Local copy of RETH address
    address internal rocketTokenRETH;

    // Local copy of penalty contract
    address internal rocketMinipoolPenalty;

    // Used to prevent direct access to delegate and prevent calling initialise more than once
    StorageState storageState = StorageState.Undefined;

    // Whether node operator has finalised the pool
    bool internal finalised;

    // Trusted member scrub votes
    mapping(address => bool) memberScrubVotes;
    uint256 totalScrubVotes;
}

File 6 of 25 : 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.7.6;

// 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 7 of 25 : 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.7.6;

// 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 8 of 25 : 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.7.6;

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

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

interface RocketDAOProtocolSettingsMinipoolInterface {
    function getLaunchBalance() external view returns (uint256);
    function getDepositNodeAmount(MinipoolDeposit _depositType) external view returns (uint256);
    function getFullDepositNodeAmount() external view returns (uint256);
    function getHalfDepositNodeAmount() external view returns (uint256);
    function getEmptyDepositNodeAmount() external view returns (uint256);
    function getDepositUserAmount(MinipoolDeposit _depositType) external view returns (uint256);
    function getFullDepositUserAmount() external view returns (uint256);
    function getHalfDepositUserAmount() external view returns (uint256);
    function getEmptyDepositUserAmount() external view returns (uint256);
    function getSubmitWithdrawableEnabled() external view returns (bool);
    function getLaunchTimeout() external view returns (uint256);
    function getMaximumCount() external view returns (uint256);
}

File 9 of 25 : 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.7.6;

// 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 getMinimumPerMinipoolStake() external view returns (uint256);
    function getMaximumPerMinipoolStake() external view returns (uint256);
}

File 10 of 25 : RocketMinipoolFactoryInterface.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.7.6;

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

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

interface RocketMinipoolFactoryInterface {
    function getMinipoolBytecode() external pure returns (bytes memory);
    function deployContract(address _nodeAddress, MinipoolDeposit _depositType, uint256 _salt) external returns (address);
}

File 11 of 25 : 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.7.6;

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

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

interface RocketMinipoolInterface {
    function initialise(address _nodeAddress, MinipoolDeposit _depositType) 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 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 nodeDeposit(bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function userDeposit() external payable;
    function distributeBalance() external;
    function distributeBalanceAndFinalise() external;
    function refund() external;
    function slash() external;
    function finalise() external;
    function canStake() external view returns (bool);
    function stake(bytes calldata _validatorSignature, bytes32 _depositDataRoot) external;
    function setWithdrawable() external;
    function dissolve() external;
    function close() external;
    function voteScrub() external;
}

File 12 of 25 : 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.7.6;
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 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 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 getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory);
    function createMinipool(address _nodeAddress, MinipoolDeposit _depositType, uint256 _salt) external returns (RocketMinipoolInterface);
    function destroyMinipool() external;
    function incrementNodeStakingMinipoolCount(address _nodeAddress) external;
    function decrementNodeStakingMinipoolCount(address _nodeAddress) external;
    function incrementNodeFinalisedMinipoolCount(address _nodeAddress) external;
    function setMinipoolPubkey(bytes calldata _pubkey) external;
    function getMinipoolDetails(address _minipoolAddress) external view returns (MinipoolDetails memory);
}

File 13 of 25 : RocketMinipoolPenaltyInterface.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.7.6;

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

interface RocketMinipoolPenaltyInterface {
    // Max penalty rate
    function setMaxPenaltyRate(uint256 _rate) external;
    function getMaxPenaltyRate() external view returns (uint256);

    // Penalty rate
    function setPenaltyRate(address _minipoolAddress, uint256 _rate) external;
    function getPenaltyRate(address _minipoolAddress) external view returns(uint256);
}

File 14 of 25 : 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.7.6;

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

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

interface RocketMinipoolQueueInterface {
    function getTotalLength() external view returns (uint256);
    function getLength(MinipoolDeposit _depositType) external view returns (uint256);
    function getTotalCapacity() external view returns (uint256);
    function getEffectiveCapacity() external view returns (uint256);
    function getNextCapacity() external view returns (uint256);
    function getNextDeposit() external view returns (MinipoolDeposit, uint256);
    function enqueueMinipool(MinipoolDeposit _depositType, address _minipool) external;
    function dequeueMinipool() external returns (address minipoolAddress);
    function dequeueMinipoolByDeposit(MinipoolDeposit _depositType) external returns (address minipoolAddress);
    function removeMinipool(MinipoolDeposit _depositType) external;
}

File 15 of 25 : RocketNetworkPenaltiesInterface.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.7.6;

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

interface RocketNetworkPenaltiesInterface {
    function submitPenalty(address _minipoolAddress, uint256 _block) external;
    function executeUpdatePenalty(address _minipoolAddress, uint256 _block) external;
    function getPenaltyCount(address _minipoolAddress) external view returns (uint256);
}

File 16 of 25 : RocketNetworkPricesInterface.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.7.6;

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

interface RocketNetworkPricesInterface {
    function getPricesBlock() external view returns (uint256);
    function getRPLPrice() external view returns (uint256);
    function getEffectiveRPLStake() external view returns (uint256);
    function getEffectiveRPLStakeUpdatedBlock() external view returns (uint256);
    function getLatestReportableBlock() external view returns (uint256);
    function inConsensus() external view returns (bool);
    function submitPrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) external;
    function executeUpdatePrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) external;
    function increaseEffectiveRPLStake(uint256 _amount) external;
    function decreaseEffectiveRPLStake(uint256 _amount) external;
}

File 17 of 25 : RocketNodeDistributorFactoryInterface.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.7.6;

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

interface RocketNodeDistributorFactoryInterface {
    function getProxyBytecode() external pure returns (bytes memory);
    function getProxyAddress(address _nodeAddress) external view returns(address);
    function createProxy(address _nodeAddress) external;
}

File 18 of 25 : RocketNodeDistributorInterface.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.7.6;

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

interface RocketNodeDistributorInterface {
    function distribute() external;
}

File 19 of 25 : 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
  *
  */

pragma solidity 0.7.6;
pragma abicoder v2;

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

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 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 20 of 25 : 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
  *
  */

pragma solidity 0.7.6;

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

interface RocketNodeStakingInterface {
    function getTotalRPLStake() external view returns (uint256);
    function getNodeRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeRPLStakedTime(address _nodeAddress) external view returns (uint256);
    function getTotalEffectiveRPLStake() external view returns (uint256);
    function calculateTotalEffectiveRPLStake(uint256 offset, uint256 limit, uint256 rplPrice) 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 getNodeMinipoolLimit(address _nodeAddress) external view returns (uint256);
    function stakeRPL(uint256 _amount) external;
    function stakeRPLFor(address _nodeAddress, uint256 _amount) external;
    function withdrawRPL(uint256 _amount) external;
    function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) external;
}

File 21 of 25 : AddressSetStorageInterface.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.7.6;

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

interface AddressSetStorageInterface {
    function getCount(bytes32 _key) external view returns (uint);
    function getItem(bytes32 _key, uint _index) external view returns (address);
    function getIndexOf(bytes32 _key, address _value) external view returns (int);
    function addItem(bytes32 _key, address _value) external;
    function removeItem(bytes32 _key, address _value) external;
}

File 22 of 25 : 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.7.6;

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

File 23 of 25 : 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.7.6;

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

File 24 of 25 : 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.7.6;

// 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,   // The minipool has become withdrawable on the beacon chain and can be withdrawn from by the node operator
    Dissolved       // The minipool has been dissolved and its user deposited ETH has been returned to the deposit pool
}

File 25 of 25 : 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.7.6;

// 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 minipoolLimit;
    uint256 minipoolCount;
    uint256 balanceETH;
    uint256 balanceRETH;
    uint256 balanceRPL;
    uint256 balanceOldRPL;
    address withdrawalAddress;
    address pendingWithdrawalAddress;
    bool smoothingPoolRegistrationState;
    uint256 smoothingPoolRegistrationChanged;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minipool","type":"address"},{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"MinipoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minipool","type":"address"},{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"MinipoolDestroyed","type":"event"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"enum MinipoolDeposit","name":"_depositType","type":"uint8"},{"internalType":"uint256","name":"_salt","type":"uint256"}],"name":"createMinipool","outputs":[{"internalType":"contract RocketMinipoolInterface","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"decrementNodeStakingMinipoolCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"destroyMinipool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getActiveMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFinalisedMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getMinipoolAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_pubkey","type":"bytes"}],"name":"getMinipoolByPubkey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getMinipoolCountPerStatus","outputs":[{"internalType":"uint256","name":"initialisedCount","type":"uint256"},{"internalType":"uint256","name":"prelaunchCount","type":"uint256"},{"internalType":"uint256","name":"stakingCount","type":"uint256"},{"internalType":"uint256","name":"withdrawableCount","type":"uint256"},{"internalType":"uint256","name":"dissolvedCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minipoolAddress","type":"address"}],"name":"getMinipoolDestroyed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minipoolAddress","type":"address"}],"name":"getMinipoolDetails","outputs":[{"components":[{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"address","name":"minipoolAddress","type":"address"},{"internalType":"bytes","name":"pubkey","type":"bytes"},{"internalType":"enum MinipoolStatus","name":"status","type":"uint8"},{"internalType":"uint256","name":"statusBlock","type":"uint256"},{"internalType":"uint256","name":"statusTime","type":"uint256"},{"internalType":"bool","name":"finalised","type":"bool"},{"internalType":"enum MinipoolDeposit","name":"depositType","type":"uint8"},{"internalType":"uint256","name":"nodeFee","type":"uint256"},{"internalType":"uint256","name":"nodeDepositBalance","type":"uint256"},{"internalType":"bool","name":"nodeDepositAssigned","type":"bool"},{"internalType":"uint256","name":"userDepositBalance","type":"uint256"},{"internalType":"bool","name":"userDepositAssigned","type":"bool"},{"internalType":"uint256","name":"userDepositAssignedTime","type":"uint256"},{"internalType":"bool","name":"useLatestDelegate","type":"bool"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"address","name":"previousDelegate","type":"address"},{"internalType":"address","name":"effectiveDelegate","type":"address"},{"internalType":"uint256","name":"penaltyCount","type":"uint256"},{"internalType":"uint256","name":"penaltyRate","type":"uint256"}],"internalType":"struct MinipoolDetails","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minipoolAddress","type":"address"}],"name":"getMinipoolExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minipoolAddress","type":"address"}],"name":"getMinipoolPubkey","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minipoolAddress","type":"address"}],"name":"getMinipoolWithdrawalCredentials","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeActiveMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeFinalisedMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getNodeMinipoolAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeStakingMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getNodeValidatingMinipoolAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeValidatingMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getPrelaunchMinipools","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingMinipoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"incrementNodeFinalisedMinipoolCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"incrementNodeStakingMinipoolCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_pubkey","type":"bytes"}],"name":"setMinipoolPubkey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

608060405260008054610100600160a81b03191690553480156200002257600080fd5b506040516200514538038062005145833981016040819052620000459162000078565b6000805460ff196001600160a01b0390931661010002610100600160a81b031990911617919091166002179055620000a8565b6000602082840312156200008a578081fd5b81516001600160a01b0381168114620000a1578182fd5b9392505050565b61508d80620000b86000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c806375b59c7f116100f9578063b04e886811610097578063cf6a476311610071578063cf6a4763146103b3578063d1ea6ce0146103c6578063eff7319f146103ce578063f90267c4146103e1576101b9565b8063b04e886814610385578063b88a89f714610398578063ce9b79ad146103ab576101b9565b80639907288c116100d35780639907288c146103445780639da0700f14610357578063a757987a1461036a578063ae4d0bed1461037d576101b9565b806375b59c7f146103165780637bb40aaf146103295780638b30002914610331576101b9565b80633eb535e91161016657806357b4ef6b1161014057806357b4ef6b146102bb5780635dfef965146102ce578063606bb62e146102ee57806367bca2351461030e576101b9565b80633eb535e914610273578063518e703c1461028657806354fd4d50146102a6576101b9565b80632c7f64d4116101975780632c7f64d41461021a5780632cb76c371461022f5780633b5ecefa1461024f576101b9565b80631844ec01146101be5780631ce9ec33146101e7578063204379c9146101fa575b600080fd5b6101d16101cc36600461456a565b6103f4565b6040516101de9190614caa565b60405180910390f35b6101d16101f536600461456a565b610523565b61020d61020836600461456a565b61060f565b6040516101de9190614e37565b61022d61022836600461462d565b611005565b005b61024261023d36600461456a565b6113cd565b6040516101de9190614cd8565b61026261025d36600461479a565b61141c565b6040516101de959493929190614f93565b61024261028136600461456a565b611687565b6102996102943660046145a2565b6116be565b6040516101de9190614c13565b6102ae611de0565b6040516101de9190614fb6565b6101d16102c936600461456a565b611de9565b6102e16102dc36600461479a565b611dff565b6040516101de9190614c52565b6103016102fc36600461456a565b61205e565b6040516101de9190614c9f565b6101d161208f565b61022d61032436600461456a565b6120f4565b61022d6123f2565b61029961033f3660046145e2565b61285f565b61022d61035236600461456a565b61294e565b6102996103653660046145e2565b612c37565b61030161037836600461456a565b612c9a565b6101d1612cb0565b61022d61039336600461456a565b612de1565b6101d16103a636600461456a565b61301b565b6101d1613031565b6102996103c136600461469a565b6131d5565b6101d1613206565b6102996103dc36600461476a565b613266565b6101d16103ef36600461456a565b61334b565b6000806104356040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b905060006104688460405160200161044d91906148e9565b6040516020818303038152906040528051906020012061346b565b90506000826001600160a01b031663c9d6fee98660405160200161048c91906149be565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016104be9190614caa565b60206040518083038186803b1580156104d657600080fd5b505afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e9190614782565b905061051a81836134f7565b95945050505050565b6000806105646040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663c9d6fee98460405160200161058691906149be565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016105b89190614caa565b60206040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106089190614782565b9392505050565b6106176144cb565b60408051808201909152601681527f726f636b65744e6574776f726b50656e616c746965730000000000000000000060208201528290819060009061065b906133ae565b9050600061069d6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c50656e616c747900000000000000000000008152506133ae565b90506106a76144cb565b6106b08761205e565b151581526106bd87611687565b8160400181905250846001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b1580156106fe57600080fd5b505afa158015610712573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610736919061474b565b8160600190600481111561074657fe5b9081600481111561075357fe5b81525050846001600160a01b031663e67cd5b06040518163ffffffff1660e01b815260040160206040518083038186803b15801561079057600080fd5b505afa1580156107a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c89190614782565b816080018181525050846001600160a01b0316633e0a56b06040518163ffffffff1660e01b815260040160206040518083038186803b15801561080a57600080fd5b505afa15801561081e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108429190614782565b8160a0018181525050846001600160a01b031663a129a5ee6040518163ffffffff1660e01b815260040160206040518083038186803b15801561088457600080fd5b505afa158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc919061460d565b151560c0820152604080517f5abd37e400000000000000000000000000000000000000000000000000000000815290516001600160a01b03871691635abd37e4916004808301926020929190829003018186803b15801561091c57600080fd5b505afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610954919061472f565b8160e00190600381111561096457fe5b9081600381111561097157fe5b81525050846001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ae57600080fd5b505afa1580156109c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e69190614782565b81610100018181525050846001600160a01b03166374ca6bf26040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2957600080fd5b505afa158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a619190614782565b81610120018181525050846001600160a01b03166369c089ea6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa457600080fd5b505afa158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061460d565b1515610140820152604080517fe7e04aba00000000000000000000000000000000000000000000000000000000815290516001600160a01b0387169163e7e04aba916004808301926020929190829003018186803b158015610b3d57600080fd5b505afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b759190614782565b81610160018181525050846001600160a01b031663d91eda626040518163ffffffff1660e01b815260040160206040518083038186803b158015610bb857600080fd5b505afa158015610bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf0919061460d565b1515610180820152604080517fa2940a9000000000000000000000000000000000000000000000000000000000815290516001600160a01b0387169163a2940a90916004808301926020929190829003018186803b158015610c5157600080fd5b505afa158015610c65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c899190614782565b816101a0018181525050836001600160a01b0316638ee7d0cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccc57600080fd5b505afa158015610ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d04919061460d565b15156101c0820152604080517fbc7f3b5000000000000000000000000000000000000000000000000000000000815290516001600160a01b0386169163bc7f3b50916004808301926020929190829003018186803b158015610d6557600080fd5b505afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d9190614586565b816101e001906001600160a01b031690816001600160a01b031681525050836001600160a01b031663be1d1d326040518163ffffffff1660e01b815260040160206040518083038186803b158015610df457600080fd5b505afa158015610e08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2c9190614586565b8161020001906001600160a01b031690816001600160a01b031681525050836001600160a01b0316631dcef0bf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8357600080fd5b505afa158015610e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebb9190614586565b6001600160a01b039081166102208301526040517ff8bfd1510000000000000000000000000000000000000000000000000000000081529084169063f8bfd15190610f0a908a90600401614c13565b60206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a9190614782565b6102408201526040517fa1e8487d0000000000000000000000000000000000000000000000000000000081526001600160a01b0383169063a1e8487d90610fa5908a90600401614c13565b60206040518083038186803b158015610fbd57600080fd5b505afa158015610fd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff59190614782565b6102608201529695505050505050565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306110da8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b6020831061109a5780518252601f19909201916020918201910161107b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120613554565b6001600160a01b0316816001600160a01b03161461113f576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120611198906135ae565b6111e9576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006112296040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b905060003390506000816001600160a01b03166370dabc9e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561126b57600080fd5b505afa15801561127f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a39190614586565b905061130b336040516020016112b99190614a14565b6040516020818303038152906040528051906020012089898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061360892505050565b61133d8888604051602001611321929190614b16565b60405160208183030381529060405280519060200120336136e9565b826001600160a01b031663889271668260405160200161135d9190614893565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b8152600401611391929190614cb3565b600060405180830381600087803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b505050505050505050505050565b604051606090611406907f0100000000000000000000000000000000000000000000000000000000000000906000908590602001614812565b6040516020818303038152906040529050919050565b6000806000806000806114636040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050600060405160200161147690614bea565b6040516020818303038152906040528051906020012090506000611498612cb0565b905060006114a68b8b613758565b9050818111806114b4575089155b156114bc5750805b8a5b81811015611678576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0387169063f3358a3a906115109088908690600401614cca565b60206040518083038186803b15801561152857600080fd5b505afa15801561153c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115609190614586565b90506000816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b15801561159d57600080fd5b505afa1580156115b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d5919061474b565b905060008160048111156115e557fe5b14156115f6576001909b019a61166e565b600181600481111561160457fe5b1415611615576001909a019961166e565b600281600481111561162357fe5b14156116345760019099019861166e565b600381600481111561164257fe5b14156116535760019098019761166e565b600481600481111561166157fe5b141561166e576001909701965b50506001016114be565b50505050509295509295909350565b60606116b88260405160200161169d9190614a14565b604051602081830303815290604052805190602001206137b2565b92915050565b60006040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306117548260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146117b9576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6040518060400160405280601181526020017f726f636b65744e6f64654465706f7369740000000000000000000000000000008152503361184d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146118b2576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b60006118f26040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152506133ae565b905060006119346040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b6040517f90f7ff4c0000000000000000000000000000000000000000000000000000000081529091506001600160a01b038316906390f7ff4c9061197c908d90600401614c13565b60206040518083038186803b15801561199457600080fd5b505afa1580156119a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cc9190614782565b6119d58b6103f4565b106119fb5760405162461bcd60e51b81526004016119f290614d7d565b60405180910390fd5b6000611a1e604051806060016040528060218152602001615016602191396133ae565b90506000611a2a613031565b9050816001600160a01b0316636d4f8d3d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a6557600080fd5b505afa158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d9190614782565b611aa8826001613758565b1115611ac65760405162461bcd60e51b81526004016119f290614d0f565b50506000611ad58b8b8b61390e565b9050611b0881604051602001611aeb9190614ac0565b6040516020818303038152906040528051906020012060016139ed565b816001600160a01b03166388927166604051602001611b2690614bea565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401611b5a929190614cb3565b600060405180830381600087803b158015611b7457600080fd5b505af1158015611b88573d6000803e3d6000fd5b50505050816001600160a01b031663889271668c604051602001611bac91906149be565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401611be0929190614cb3565b600060405180830381600087803b158015611bfa57600080fd5b505af1158015611c0e573d6000803e3d6000fd5b5060039250611c1b915050565b8a6003811115611c2757fe5b1415611ce9576000611c6d6040518060400160405280601481526020017f726f636b657444414f4e6f6465547275737465640000000000000000000000008152506133ae565b6040517f72043ec40000000000000000000000000000000000000000000000000000000081529091506001600160a01b038216906372043ec490611cb5908f90600401614c13565b600060405180830381600087803b158015611ccf57600080fd5b505af1158015611ce3573d6000803e3d6000fd5b50505050505b8a6001600160a01b0316816001600160a01b03167f08b4b91bafaf992145c5dd7e098dfcdb32f879714c154c651c2758a44c7aeae442604051611d2c9190614caa565b60405180910390a3611d726040518060400160405280601381526020017f726f636b65744d696e69706f6f6c5175657565000000000000000000000000008152506133ae565b6001600160a01b031663b2e5fe9b8b836040518363ffffffff1660e01b8152600401611d9f929190614ceb565b600060405180830381600087803b158015611db957600080fd5b505af1158015611dcd573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b60005460ff1681565b60006116b88260405160200161044d9190614a6a565b60606000611e416040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b90506000604051602001611e5490614bea565b6040516020818303038152906040528051906020012090506000611e76612cb0565b90506000611e848787613758565b905081811180611e92575085155b15611e9a5750805b6000611ea682896134f7565b67ffffffffffffffff81118015611ebc57600080fd5b50604051908082528060200260200182016040528015611ee6578160200160208202803683370190505b5090506000885b83811015612050576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0389169063f3358a3a90611f3f908a908690600401614cca565b60206040518083038186803b158015611f5757600080fd5b505afa158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190614586565b90506000816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612004919061474b565b9050600181600481111561201457fe5b1415612046578185858151811061202757fe5b6001600160a01b03909216602092830291909101909101526001909301925b5050600101611eed565b508152979650505050505050565b60006116b8826040516020016120749190614ac0565b604051602081830303815290604052805190602001206135ae565b60408051808201909152601781527f6d696e69706f6f6c732e7374616b696e672e636f756e7400000000000000000060209091015260006120ef7f3441dc4461171402746c7de6880184ae1bfbc9def01a5bd7508263456c14441961346b565b905090565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306121888260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146121ed576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612246906135ae565b612297576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b336122a185613a5a565b6000856040516020016122b49190614a6a565b60405160208183030381529060405280519060200120905060006122d78261346b565b90506122ed826122e88360016134f7565b613c79565b60006040516020016122fe90614995565b60405160208183030381529060405280519060200120905060006123218261346b565b9050612332826122e88360016134f7565b61234789846123428160016134f7565b613ce5565b6123e78960405160200161235b9190614b94565b60405160208183030381529060405280519060200120866001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b1580156123aa57600080fd5b505afa1580156123be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e29190614782565b61424e565b505050505050505050565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306124868260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146124eb576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612544906135ae565b612595576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006125d56040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b905060003390506000816001600160a01b03166370dabc9e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261757600080fd5b505afa15801561262b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264f9190614586565b9050612682336040516020016126659190614ac0565b6040516020818303038152906040528051906020012060006139ed565b61269633604051602001611aeb919061493f565b826001600160a01b031663f79b36ad6040516020016126b490614bea565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b81526004016126e8929190614cb3565b600060405180830381600087803b15801561270257600080fd5b505af1158015612716573d6000803e3d6000fd5b50505050826001600160a01b031663f79b36ad8260405160200161273a91906149be565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b815260040161276e929190614cb3565b600060405180830381600087803b15801561278857600080fd5b505af115801561279c573d6000803e3d6000fd5b5050505060006127ab33611687565b90506127dc336040516020016127c19190614a14565b604051602081830303815290604052805190602001206142ba565b61280b816040516020016127f09190614b4f565b6040516020818303038152906040528051906020012061433a565b816001600160a01b0316336001600160a01b03167f3097cb0f536cd88115b814915d7030d2fe958943357cd2b1a9e1dba8a673ec694260405161284e9190614caa565b60405180910390a350505050505050565b6000806128a06040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663f3358a3a856040516020016128c291906149be565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b81526004016128f6929190614cca565b60206040518083038186803b15801561290e57600080fd5b505afa158015612922573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129469190614586565b949350505050565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306129e28260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b031614612a47576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612aa0906135ae565b612af1576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b33612afb85613a5a565b600085604051602001612b0e9190614a6a565b6040516020818303038152906040528051906020012090506000612b318261346b565b9050612b42826122e8836001613758565b6000604051602001612b5390614995565b6040516020818303038152906040528051906020012090506000612b768261346b565b9050612b87826122e8836001613758565b612b978984612342816001613758565b6123e789604051602001612bab9190614b94565b60405160208183030381529060405280519060200120866001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b158015612bfa57600080fd5b505afa158015612c0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c329190614782565b61439f565b600080612c786040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663f3358a3a856040516020016128c29190614893565b60006116b882604051602001612074919061493f565b600080612cf16040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b604080518082018252600f81527f6d696e69706f6f6c732e696e6465780000000000000000000000000000000000602090910152517fc9d6fee90000000000000000000000000000000000000000000000000000000081529091506001600160a01b0382169063c9d6fee990612d8b907ffd351ca1580febcf3f7f5a9bf9fd8dff9e6da5ca4df400be6b63fcdc2f2a918490600401614caa565b60206040518083038186803b158015612da357600080fd5b505afa158015612db7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddb9190614782565b91505090565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525030612e758260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b031614612eda576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612f33906135ae565b612f84576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b612fb584604051602001612f9891906148e9565b60405160208183030381529060405280519060200120600161439f565b60408051808201909152601981527f6d696e69706f6f6c732e66696e616c697365642e636f756e74000000000000006020909101526130157f7600e27d933b4f22ce3529323416023ac97f47a7481431772c019790c3ca57d2600161439f565b50505050565b60006116b88260405160200161044d91906148e9565b6000806130726040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b604080518082018252600f81527f6d696e69706f6f6c732e696e6465780000000000000000000000000000000000602090910152517fc9d6fee90000000000000000000000000000000000000000000000000000000081529091506000906001600160a01b0383169063c9d6fee99061310f907ffd351ca1580febcf3f7f5a9bf9fd8dff9e6da5ca4df400be6b63fcdc2f2a918490600401614caa565b60206040518083038186803b15801561312757600080fd5b505afa15801561313b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315f9190614782565b60408051808201909152601981527f6d696e69706f6f6c732e66696e616c697365642e636f756e7400000000000000602090910152905060006131c17f7600e27d933b4f22ce3529323416023ac97f47a7481431772c019790c3ca57d261346b565b90506131cd82826134f7565b935050505090565b60006116b8826040516020016131eb9190614b4f565b60405160208183030381529060405280519060200120613554565b60408051808201909152601981527f6d696e69706f6f6c732e66696e616c697365642e636f756e740000000000000060209091015260006120ef7f7600e27d933b4f22ce3529323416023ac97f47a7481431772c019790c3ca57d261346b565b6000806132a76040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663f3358a3a6040516020016132c790614bea565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b81526004016132fb929190614cca565b60206040518083038186803b15801561331357600080fd5b505afa158015613327573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106089190614586565b60008061338c6040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663c9d6fee9846040516020016105869190614893565b60008061340e8360405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b90506001600160a01b0381166116b8576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134c557600080fd5b505afa1580156134d9573d6000803e3d6000fd5b505050506040513d60208110156134ef57600080fd5b505192915050565b60008282111561354e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134c557600080fd5b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134c557600080fd5b600060019054906101000a90046001600160a01b03166001600160a01b0316632e28d08483836040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613680578181015183820152602001613668565b50505050905090810190601f1680156136ad5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156136cd57600080fd5b505af11580156136e1573d6000803e3d6000fd5b505050505050565b60008054604080517fca446dd9000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b03858116602483015291516101009093049091169263ca446dd99260448084019382900301818387803b1580156136cd57600080fd5b600082820183811015610608576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008054604080517fc031a1800000000000000000000000000000000000000000000000000000000081526004810185905290516060936101009093046001600160a01b03169263c031a1809260248082019391829003018186803b15801561381a57600080fd5b505afa15801561382e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561385757600080fd5b810190808051604051939291908464010000000082111561387757600080fd5b90830190602082018581111561388c57600080fd5b82516401000000008111828201881017156138a657600080fd5b82525081516020918201929091019080838360005b838110156138d35781810151838201526020016138bb565b50505050905090810190601f1680156139005780820380516001836020036101000a031916815260200191505b506040525050509050919050565b60008061394f6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c466163746f727900000000000000000000008152506133ae565b6040517f3b25f3c20000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690633b25f3c29061399b90889088908890600401614c27565b602060405180830381600087803b1580156139b557600080fd5b505af11580156139c9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051a9190614586565b60008054604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101869052841515602482015290516101009092046001600160a01b03169263abfdcced9260448084019382900301818387803b1580156136cd57600080fd5b6000613a9a6040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f7279000000008152506133ae565b90506000816001600160a01b031663fa2a5b01846040518263ffffffff1660e01b8152600401613aca9190614c13565b60206040518083038186803b158015613ae257600080fd5b505afa158015613af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b1a9190614586565b90506001600160a01b0381163115613c74576000613b6c6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152506133ae565b6040517f927ece4f0000000000000000000000000000000000000000000000000000000081529091506001600160a01b0382169063927ece4f90613bb4908790600401614c13565b60206040518083038186803b158015613bcc57600080fd5b505afa158015613be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c04919061460d565b613c205760405162461bcd60e51b81526004016119f290614d46565b6000829050806001600160a01b031663e4fc6b6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613c6057600080fd5b505af11580156123e7573d6000803e3d6000fd5b505050565b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b1580156136cd57600080fd5b6000613d256040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506133ae565b90506000613d4a604051806060016040528060218152602001615016602191396133ae565b90506000613d8c6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506133ae565b90506000613dce6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152506133ae565b9050836001600160a01b03166337ab50046040518163ffffffff1660e01b815260040160206040518083038186803b158015613e0957600080fd5b505afa158015613e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e41919061460d565b613e5d5760405162461bcd60e51b81526004016119f290614e00565b6040517f9961cee40000000000000000000000000000000000000000000000000000000081526000906001600160a01b03831690639961cee490613ea5908b90600401614c13565b60206040518083038186803b158015613ebd57600080fd5b505afa158015613ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ef59190614782565b90506000613fe4846001600160a01b0316631e72ba866040518163ffffffff1660e01b815260040160206040518083038186803b158015613f3557600080fd5b505afa158015613f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f6d9190614782565b866001600160a01b031663162adbfd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613fa657600080fd5b505afa158015613fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fde9190614782565b9061440b565b9050600061406c876001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561402457600080fd5b505afa158015614038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405c9190614782565b614066848c61440b565b90614464565b905060006140ee886001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156140ac57600080fd5b505afa1580156140c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e49190614782565b614066858c61440b565b9050888a11156141b95780841161410c575050505050505050613c74565b600061411883836134f7565b9050600061412686846134f7565b9050818111156141335750805b6040517f052e56400000000000000000000000000000000000000000000000000000000081526001600160a01b038b169063052e564090614178908490600401614caa565b600060405180830381600087803b15801561419257600080fd5b505af11580156141a6573d6000803e3d6000fd5b5050505050505050505050505050613c74565b89891115614241578184116141d5575050505050505050613c74565b60006141e182846134f7565b905060006141ef86856134f7565b9050818111156141fc5750805b6040517fb58d89d30000000000000000000000000000000000000000000000000000000081526001600160a01b038b169063b58d89d390614178908490600401614caa565b5050505050505050505050565b60008054604080517febb9d8c9000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263ebb9d8c99260448084019382900301818387803b1580156136cd57600080fd5b60008054604080517f616b59f60000000000000000000000000000000000000000000000000000000081526004810185905290516101009092046001600160a01b03169263616b59f69260248084019382900301818387803b15801561431f57600080fd5b505af1158015614333573d6000803e3d6000fd5b5050505050565b60008054604080517f0e14a3760000000000000000000000000000000000000000000000000000000081526004810185905290516101009092046001600160a01b031692630e14a3769260248084019382900301818387803b15801561431f57600080fd5b60008054604080517fadb353dc000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263adb353dc9260448084019382900301818387803b1580156136cd57600080fd5b60008261441a575060006116b8565b8282028284828161442757fe5b04146106085760405162461bcd60e51b81526004018080602001828103825260218152602001806150376021913960400191505060405180910390fd5b60008082116144ba576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816144c357fe5b049392505050565b604080516102808101825260008082526020820181905260609282018390529181018290526080810182905260a0810182905260c081018290529060e0820190815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082018190526101208201819052610140820181905261016082018190526101809091015290565b60006020828403121561457b578081fd5b813561060881614ff0565b600060208284031215614597578081fd5b815161060881614ff0565b6000806000606084860312156145b6578182fd5b83356145c181614ff0565b925060208401356145d181615008565b929592945050506040919091013590565b600080604083850312156145f4578182fd5b82356145ff81614ff0565b946020939093013593505050565b60006020828403121561461e578081fd5b81518015158114610608578182fd5b6000806020838503121561463f578182fd5b823567ffffffffffffffff80821115614656578384fd5b818501915085601f830112614669578384fd5b813581811115614677578485fd5b866020828501011115614688578485fd5b60209290920196919550909350505050565b600060208083850312156146ac578182fd5b823567ffffffffffffffff808211156146c3578384fd5b818501915085601f8301126146d6578384fd5b8135818111156146e257fe5b60405184601f19601f84011682010181811084821117156146ff57fe5b6040528181528382018501881015614715578586fd5b818585018683013790810190930193909352509392505050565b600060208284031215614740578081fd5b815161060881615008565b60006020828403121561475c578081fd5b815160058110610608578182fd5b60006020828403121561477b578081fd5b5035919050565b600060208284031215614793578081fd5b5051919050565b600080604083850312156147ac578182fd5b50508035926020909101359150565b6001600160a01b03169052565b15159052565b600081518084526147e6816020860160208601614fc4565b601f01601f19169290920160200192915050565b6004811061480457fe5b9052565b6005811061480457fe5b7fff000000000000000000000000000000000000000000000000000000000000009390931683527fffffffffffffffffffffff00000000000000000000000000000000000000000091909116600183015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600c82015260200190565b7f6e6f64652e6d696e69706f6f6c732e76616c69646174696e672e696e64657800815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601f82015260330190565b7f6e6f64652e6d696e69706f6f6c732e66696e616c697365642e636f756e740000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601e82015260320190565b7f6d696e69706f6f6c2e64657374726f7965640000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601282015260260190565b7f6d696e69706f6f6c732e7374616b696e672e636f756e74000000000000000000815260170190565b7f6e6f64652e6d696e69706f6f6c732e696e646578000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601482015260280190565b7f6d696e69706f6f6c2e7075626b65790000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f82015260230190565b7f6e6f64652e6d696e69706f6f6c732e7374616b696e672e636f756e7400000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601c82015260300190565b7f6d696e69706f6f6c2e6578697374730000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f82015260230190565b60007f76616c696461746f722e6d696e69706f6f6c00000000000000000000000000008252828460128401379101601201908152919050565b60007f76616c696461746f722e6d696e69706f6f6c000000000000000000000000000082528251614b87816012850160208701614fc4565b9190910160120192915050565b7f6e6f64652e617665726167652e6665652e6e756d657261746f72000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601a820152602e0190565b7f6d696e69706f6f6c732e696e64657800000000000000000000000000000000008152600f0190565b6001600160a01b0391909116815260200190565b6001600160a01b038416815260608101614c4460208301856147fa565b826040830152949350505050565b6020808252825182820181905260009190848201906040850190845b81811015614c935783516001600160a01b031683529284019291840191600101614c6e565b50909695505050505050565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b60006020825261060860208301846147ce565b60408101614cf982856147fa565b6001600160a01b03831660208301529392505050565b6020808252601d908201527f476c6f62616c206d696e69706f6f6c206c696d69742072656163686564000000604082015260600190565b6020808252601b908201527f4469737472696275746f72206e6f7420696e697469616c697365640000000000604082015260600190565b60208082526042908201527f4d696e69706f6f6c20636f756e74206166746572206465706f7369742065786360408201527f65656473206c696d6974206261736564206f6e206e6f64652052504c2073746160608201527f6b65000000000000000000000000000000000000000000000000000000000000608082015260a00190565b6020808252601b908201527f4e6574776f726b206973206e6f7420696e20636f6e73656e7375730000000000604082015260600190565b600060208252614e4b6020830184516147c8565b6020830151614e5d60408401826147bb565b506040830151610280806060850152614e7a6102a08501836147ce565b91506060850151614e8e6080860182614808565b50608085015160a085015260a085015160c085015260c0850151614eb560e08601826147c8565b5060e0850151610100614eca818701836147fa565b86015161012086810191909152860151610140808701919091528601519050610160614ef8818701836147c8565b8601516101808681019190915286015190506101a0614f19818701836147c8565b8601516101c08681019190915286015190506101e0614f3a818701836147c8565b8601519050610200614f4e868201836147bb565b8601519050610220614f62868201836147bb565b8601519050610240614f76868201836147bb565b860151610260868101919091529095015193019290925250919050565b948552602085019390935260408401919091526060830152608082015260a00190565b60ff91909116815260200190565b60005b83811015614fdf578181015183820152602001614fc7565b838111156130155750506000910152565b6001600160a01b038116811461500557600080fd5b50565b6004811061500557600080fdfe726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212208971d8b47ed125e8951a441cd2b71997e7e509eededdf4c64e8f1725e0ab4db864736f6c634300070600330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101b95760003560e01c806375b59c7f116100f9578063b04e886811610097578063cf6a476311610071578063cf6a4763146103b3578063d1ea6ce0146103c6578063eff7319f146103ce578063f90267c4146103e1576101b9565b8063b04e886814610385578063b88a89f714610398578063ce9b79ad146103ab576101b9565b80639907288c116100d35780639907288c146103445780639da0700f14610357578063a757987a1461036a578063ae4d0bed1461037d576101b9565b806375b59c7f146103165780637bb40aaf146103295780638b30002914610331576101b9565b80633eb535e91161016657806357b4ef6b1161014057806357b4ef6b146102bb5780635dfef965146102ce578063606bb62e146102ee57806367bca2351461030e576101b9565b80633eb535e914610273578063518e703c1461028657806354fd4d50146102a6576101b9565b80632c7f64d4116101975780632c7f64d41461021a5780632cb76c371461022f5780633b5ecefa1461024f576101b9565b80631844ec01146101be5780631ce9ec33146101e7578063204379c9146101fa575b600080fd5b6101d16101cc36600461456a565b6103f4565b6040516101de9190614caa565b60405180910390f35b6101d16101f536600461456a565b610523565b61020d61020836600461456a565b61060f565b6040516101de9190614e37565b61022d61022836600461462d565b611005565b005b61024261023d36600461456a565b6113cd565b6040516101de9190614cd8565b61026261025d36600461479a565b61141c565b6040516101de959493929190614f93565b61024261028136600461456a565b611687565b6102996102943660046145a2565b6116be565b6040516101de9190614c13565b6102ae611de0565b6040516101de9190614fb6565b6101d16102c936600461456a565b611de9565b6102e16102dc36600461479a565b611dff565b6040516101de9190614c52565b6103016102fc36600461456a565b61205e565b6040516101de9190614c9f565b6101d161208f565b61022d61032436600461456a565b6120f4565b61022d6123f2565b61029961033f3660046145e2565b61285f565b61022d61035236600461456a565b61294e565b6102996103653660046145e2565b612c37565b61030161037836600461456a565b612c9a565b6101d1612cb0565b61022d61039336600461456a565b612de1565b6101d16103a636600461456a565b61301b565b6101d1613031565b6102996103c136600461469a565b6131d5565b6101d1613206565b6102996103dc36600461476a565b613266565b6101d16103ef36600461456a565b61334b565b6000806104356040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b905060006104688460405160200161044d91906148e9565b6040516020818303038152906040528051906020012061346b565b90506000826001600160a01b031663c9d6fee98660405160200161048c91906149be565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016104be9190614caa565b60206040518083038186803b1580156104d657600080fd5b505afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e9190614782565b905061051a81836134f7565b95945050505050565b6000806105646040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663c9d6fee98460405160200161058691906149be565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016105b89190614caa565b60206040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106089190614782565b9392505050565b6106176144cb565b60408051808201909152601681527f726f636b65744e6574776f726b50656e616c746965730000000000000000000060208201528290819060009061065b906133ae565b9050600061069d6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c50656e616c747900000000000000000000008152506133ae565b90506106a76144cb565b6106b08761205e565b151581526106bd87611687565b8160400181905250846001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b1580156106fe57600080fd5b505afa158015610712573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610736919061474b565b8160600190600481111561074657fe5b9081600481111561075357fe5b81525050846001600160a01b031663e67cd5b06040518163ffffffff1660e01b815260040160206040518083038186803b15801561079057600080fd5b505afa1580156107a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c89190614782565b816080018181525050846001600160a01b0316633e0a56b06040518163ffffffff1660e01b815260040160206040518083038186803b15801561080a57600080fd5b505afa15801561081e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108429190614782565b8160a0018181525050846001600160a01b031663a129a5ee6040518163ffffffff1660e01b815260040160206040518083038186803b15801561088457600080fd5b505afa158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc919061460d565b151560c0820152604080517f5abd37e400000000000000000000000000000000000000000000000000000000815290516001600160a01b03871691635abd37e4916004808301926020929190829003018186803b15801561091c57600080fd5b505afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610954919061472f565b8160e00190600381111561096457fe5b9081600381111561097157fe5b81525050846001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ae57600080fd5b505afa1580156109c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e69190614782565b81610100018181525050846001600160a01b03166374ca6bf26040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2957600080fd5b505afa158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a619190614782565b81610120018181525050846001600160a01b03166369c089ea6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa457600080fd5b505afa158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061460d565b1515610140820152604080517fe7e04aba00000000000000000000000000000000000000000000000000000000815290516001600160a01b0387169163e7e04aba916004808301926020929190829003018186803b158015610b3d57600080fd5b505afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b759190614782565b81610160018181525050846001600160a01b031663d91eda626040518163ffffffff1660e01b815260040160206040518083038186803b158015610bb857600080fd5b505afa158015610bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf0919061460d565b1515610180820152604080517fa2940a9000000000000000000000000000000000000000000000000000000000815290516001600160a01b0387169163a2940a90916004808301926020929190829003018186803b158015610c5157600080fd5b505afa158015610c65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c899190614782565b816101a0018181525050836001600160a01b0316638ee7d0cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccc57600080fd5b505afa158015610ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d04919061460d565b15156101c0820152604080517fbc7f3b5000000000000000000000000000000000000000000000000000000000815290516001600160a01b0386169163bc7f3b50916004808301926020929190829003018186803b158015610d6557600080fd5b505afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d9190614586565b816101e001906001600160a01b031690816001600160a01b031681525050836001600160a01b031663be1d1d326040518163ffffffff1660e01b815260040160206040518083038186803b158015610df457600080fd5b505afa158015610e08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2c9190614586565b8161020001906001600160a01b031690816001600160a01b031681525050836001600160a01b0316631dcef0bf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8357600080fd5b505afa158015610e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebb9190614586565b6001600160a01b039081166102208301526040517ff8bfd1510000000000000000000000000000000000000000000000000000000081529084169063f8bfd15190610f0a908a90600401614c13565b60206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a9190614782565b6102408201526040517fa1e8487d0000000000000000000000000000000000000000000000000000000081526001600160a01b0383169063a1e8487d90610fa5908a90600401614c13565b60206040518083038186803b158015610fbd57600080fd5b505afa158015610fd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff59190614782565b6102608201529695505050505050565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306110da8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b6020831061109a5780518252601f19909201916020918201910161107b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120613554565b6001600160a01b0316816001600160a01b03161461113f576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120611198906135ae565b6111e9576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006112296040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b905060003390506000816001600160a01b03166370dabc9e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561126b57600080fd5b505afa15801561127f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a39190614586565b905061130b336040516020016112b99190614a14565b6040516020818303038152906040528051906020012089898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061360892505050565b61133d8888604051602001611321929190614b16565b60405160208183030381529060405280519060200120336136e9565b826001600160a01b031663889271668260405160200161135d9190614893565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b8152600401611391929190614cb3565b600060405180830381600087803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b505050505050505050505050565b604051606090611406907f0100000000000000000000000000000000000000000000000000000000000000906000908590602001614812565b6040516020818303038152906040529050919050565b6000806000806000806114636040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050600060405160200161147690614bea565b6040516020818303038152906040528051906020012090506000611498612cb0565b905060006114a68b8b613758565b9050818111806114b4575089155b156114bc5750805b8a5b81811015611678576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0387169063f3358a3a906115109088908690600401614cca565b60206040518083038186803b15801561152857600080fd5b505afa15801561153c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115609190614586565b90506000816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b15801561159d57600080fd5b505afa1580156115b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d5919061474b565b905060008160048111156115e557fe5b14156115f6576001909b019a61166e565b600181600481111561160457fe5b1415611615576001909a019961166e565b600281600481111561162357fe5b14156116345760019099019861166e565b600381600481111561164257fe5b14156116535760019098019761166e565b600481600481111561166157fe5b141561166e576001909701965b50506001016114be565b50505050509295509295909350565b60606116b88260405160200161169d9190614a14565b604051602081830303815290604052805190602001206137b2565b92915050565b60006040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306117548260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146117b9576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6040518060400160405280601181526020017f726f636b65744e6f64654465706f7369740000000000000000000000000000008152503361184d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146118b2576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b60006118f26040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152506133ae565b905060006119346040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b6040517f90f7ff4c0000000000000000000000000000000000000000000000000000000081529091506001600160a01b038316906390f7ff4c9061197c908d90600401614c13565b60206040518083038186803b15801561199457600080fd5b505afa1580156119a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cc9190614782565b6119d58b6103f4565b106119fb5760405162461bcd60e51b81526004016119f290614d7d565b60405180910390fd5b6000611a1e604051806060016040528060218152602001615016602191396133ae565b90506000611a2a613031565b9050816001600160a01b0316636d4f8d3d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a6557600080fd5b505afa158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d9190614782565b611aa8826001613758565b1115611ac65760405162461bcd60e51b81526004016119f290614d0f565b50506000611ad58b8b8b61390e565b9050611b0881604051602001611aeb9190614ac0565b6040516020818303038152906040528051906020012060016139ed565b816001600160a01b03166388927166604051602001611b2690614bea565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401611b5a929190614cb3565b600060405180830381600087803b158015611b7457600080fd5b505af1158015611b88573d6000803e3d6000fd5b50505050816001600160a01b031663889271668c604051602001611bac91906149be565b60405160208183030381529060405280519060200120836040518363ffffffff1660e01b8152600401611be0929190614cb3565b600060405180830381600087803b158015611bfa57600080fd5b505af1158015611c0e573d6000803e3d6000fd5b5060039250611c1b915050565b8a6003811115611c2757fe5b1415611ce9576000611c6d6040518060400160405280601481526020017f726f636b657444414f4e6f6465547275737465640000000000000000000000008152506133ae565b6040517f72043ec40000000000000000000000000000000000000000000000000000000081529091506001600160a01b038216906372043ec490611cb5908f90600401614c13565b600060405180830381600087803b158015611ccf57600080fd5b505af1158015611ce3573d6000803e3d6000fd5b50505050505b8a6001600160a01b0316816001600160a01b03167f08b4b91bafaf992145c5dd7e098dfcdb32f879714c154c651c2758a44c7aeae442604051611d2c9190614caa565b60405180910390a3611d726040518060400160405280601381526020017f726f636b65744d696e69706f6f6c5175657565000000000000000000000000008152506133ae565b6001600160a01b031663b2e5fe9b8b836040518363ffffffff1660e01b8152600401611d9f929190614ceb565b600060405180830381600087803b158015611db957600080fd5b505af1158015611dcd573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b60005460ff1681565b60006116b88260405160200161044d9190614a6a565b60606000611e416040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b90506000604051602001611e5490614bea565b6040516020818303038152906040528051906020012090506000611e76612cb0565b90506000611e848787613758565b905081811180611e92575085155b15611e9a5750805b6000611ea682896134f7565b67ffffffffffffffff81118015611ebc57600080fd5b50604051908082528060200260200182016040528015611ee6578160200160208202803683370190505b5090506000885b83811015612050576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0389169063f3358a3a90611f3f908a908690600401614cca565b60206040518083038186803b158015611f5757600080fd5b505afa158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190614586565b90506000816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612004919061474b565b9050600181600481111561201457fe5b1415612046578185858151811061202757fe5b6001600160a01b03909216602092830291909101909101526001909301925b5050600101611eed565b508152979650505050505050565b60006116b8826040516020016120749190614ac0565b604051602081830303815290604052805190602001206135ae565b60408051808201909152601781527f6d696e69706f6f6c732e7374616b696e672e636f756e7400000000000000000060209091015260006120ef7f3441dc4461171402746c7de6880184ae1bfbc9def01a5bd7508263456c14441961346b565b905090565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306121888260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146121ed576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612246906135ae565b612297576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b336122a185613a5a565b6000856040516020016122b49190614a6a565b60405160208183030381529060405280519060200120905060006122d78261346b565b90506122ed826122e88360016134f7565b613c79565b60006040516020016122fe90614995565b60405160208183030381529060405280519060200120905060006123218261346b565b9050612332826122e88360016134f7565b61234789846123428160016134f7565b613ce5565b6123e78960405160200161235b9190614b94565b60405160208183030381529060405280519060200120866001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b1580156123aa57600080fd5b505afa1580156123be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e29190614782565b61424e565b505050505050505050565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306124868260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b0316146124eb576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612544906135ae565b612595576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006125d56040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b905060003390506000816001600160a01b03166370dabc9e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261757600080fd5b505afa15801561262b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264f9190614586565b9050612682336040516020016126659190614ac0565b6040516020818303038152906040528051906020012060006139ed565b61269633604051602001611aeb919061493f565b826001600160a01b031663f79b36ad6040516020016126b490614bea565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b81526004016126e8929190614cb3565b600060405180830381600087803b15801561270257600080fd5b505af1158015612716573d6000803e3d6000fd5b50505050826001600160a01b031663f79b36ad8260405160200161273a91906149be565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b815260040161276e929190614cb3565b600060405180830381600087803b15801561278857600080fd5b505af115801561279c573d6000803e3d6000fd5b5050505060006127ab33611687565b90506127dc336040516020016127c19190614a14565b604051602081830303815290604052805190602001206142ba565b61280b816040516020016127f09190614b4f565b6040516020818303038152906040528051906020012061433a565b816001600160a01b0316336001600160a01b03167f3097cb0f536cd88115b814915d7030d2fe958943357cd2b1a9e1dba8a673ec694260405161284e9190614caa565b60405180910390a350505050505050565b6000806128a06040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663f3358a3a856040516020016128c291906149be565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b81526004016128f6929190614cca565b60206040518083038186803b15801561290e57600080fd5b505afa158015612922573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129469190614586565b949350505050565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250306129e28260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b031614612a47576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612aa0906135ae565b612af1576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b33612afb85613a5a565b600085604051602001612b0e9190614a6a565b6040516020818303038152906040528051906020012090506000612b318261346b565b9050612b42826122e8836001613758565b6000604051602001612b5390614995565b6040516020818303038152906040528051906020012090506000612b768261346b565b9050612b87826122e8836001613758565b612b978984612342816001613758565b6123e789604051602001612bab9190614b94565b60405160208183030381529060405280519060200120866001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b158015612bfa57600080fd5b505afa158015612c0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c329190614782565b61439f565b600080612c786040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663f3358a3a856040516020016128c29190614893565b60006116b882604051602001612074919061493f565b600080612cf16040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b604080518082018252600f81527f6d696e69706f6f6c732e696e6465780000000000000000000000000000000000602090910152517fc9d6fee90000000000000000000000000000000000000000000000000000000081529091506001600160a01b0382169063c9d6fee990612d8b907ffd351ca1580febcf3f7f5a9bf9fd8dff9e6da5ca4df400be6b63fcdc2f2a918490600401614caa565b60206040518083038186803b158015612da357600080fd5b505afa158015612db7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddb9190614782565b91505090565b6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525030612e758260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b6001600160a01b0316816001600160a01b031614612eda576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f8401528351602381850301815260439093019093528151910120612f33906135ae565b612f84576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b612fb584604051602001612f9891906148e9565b60405160208183030381529060405280519060200120600161439f565b60408051808201909152601981527f6d696e69706f6f6c732e66696e616c697365642e636f756e74000000000000006020909101526130157f7600e27d933b4f22ce3529323416023ac97f47a7481431772c019790c3ca57d2600161439f565b50505050565b60006116b88260405160200161044d91906148e9565b6000806130726040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b604080518082018252600f81527f6d696e69706f6f6c732e696e6465780000000000000000000000000000000000602090910152517fc9d6fee90000000000000000000000000000000000000000000000000000000081529091506000906001600160a01b0383169063c9d6fee99061310f907ffd351ca1580febcf3f7f5a9bf9fd8dff9e6da5ca4df400be6b63fcdc2f2a918490600401614caa565b60206040518083038186803b15801561312757600080fd5b505afa15801561313b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315f9190614782565b60408051808201909152601981527f6d696e69706f6f6c732e66696e616c697365642e636f756e7400000000000000602090910152905060006131c17f7600e27d933b4f22ce3529323416023ac97f47a7481431772c019790c3ca57d261346b565b90506131cd82826134f7565b935050505090565b60006116b8826040516020016131eb9190614b4f565b60405160208183030381529060405280519060200120613554565b60408051808201909152601981527f6d696e69706f6f6c732e66696e616c697365642e636f756e740000000000000060209091015260006120ef7f7600e27d933b4f22ce3529323416023ac97f47a7481431772c019790c3ca57d261346b565b6000806132a76040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663f3358a3a6040516020016132c790614bea565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b81526004016132fb929190614cca565b60206040518083038186803b15801561331357600080fd5b505afa158015613327573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106089190614586565b60008061338c6040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506133ae565b9050806001600160a01b031663c9d6fee9846040516020016105869190614893565b60008061340e8360405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061109a5780518252601f19909201916020918201910161107b565b90506001600160a01b0381166116b8576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134c557600080fd5b505afa1580156134d9573d6000803e3d6000fd5b505050506040513d60208110156134ef57600080fd5b505192915050565b60008282111561354e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134c557600080fd5b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134c557600080fd5b600060019054906101000a90046001600160a01b03166001600160a01b0316632e28d08483836040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613680578181015183820152602001613668565b50505050905090810190601f1680156136ad5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156136cd57600080fd5b505af11580156136e1573d6000803e3d6000fd5b505050505050565b60008054604080517fca446dd9000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b03858116602483015291516101009093049091169263ca446dd99260448084019382900301818387803b1580156136cd57600080fd5b600082820183811015610608576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008054604080517fc031a1800000000000000000000000000000000000000000000000000000000081526004810185905290516060936101009093046001600160a01b03169263c031a1809260248082019391829003018186803b15801561381a57600080fd5b505afa15801561382e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561385757600080fd5b810190808051604051939291908464010000000082111561387757600080fd5b90830190602082018581111561388c57600080fd5b82516401000000008111828201881017156138a657600080fd5b82525081516020918201929091019080838360005b838110156138d35781810151838201526020016138bb565b50505050905090810190601f1680156139005780820380516001836020036101000a031916815260200191505b506040525050509050919050565b60008061394f6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c466163746f727900000000000000000000008152506133ae565b6040517f3b25f3c20000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690633b25f3c29061399b90889088908890600401614c27565b602060405180830381600087803b1580156139b557600080fd5b505af11580156139c9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051a9190614586565b60008054604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101869052841515602482015290516101009092046001600160a01b03169263abfdcced9260448084019382900301818387803b1580156136cd57600080fd5b6000613a9a6040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f7279000000008152506133ae565b90506000816001600160a01b031663fa2a5b01846040518263ffffffff1660e01b8152600401613aca9190614c13565b60206040518083038186803b158015613ae257600080fd5b505afa158015613af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b1a9190614586565b90506001600160a01b0381163115613c74576000613b6c6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152506133ae565b6040517f927ece4f0000000000000000000000000000000000000000000000000000000081529091506001600160a01b0382169063927ece4f90613bb4908790600401614c13565b60206040518083038186803b158015613bcc57600080fd5b505afa158015613be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c04919061460d565b613c205760405162461bcd60e51b81526004016119f290614d46565b6000829050806001600160a01b031663e4fc6b6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613c6057600080fd5b505af11580156123e7573d6000803e3d6000fd5b505050565b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b1580156136cd57600080fd5b6000613d256040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506133ae565b90506000613d4a604051806060016040528060218152602001615016602191396133ae565b90506000613d8c6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506133ae565b90506000613dce6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152506133ae565b9050836001600160a01b03166337ab50046040518163ffffffff1660e01b815260040160206040518083038186803b158015613e0957600080fd5b505afa158015613e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e41919061460d565b613e5d5760405162461bcd60e51b81526004016119f290614e00565b6040517f9961cee40000000000000000000000000000000000000000000000000000000081526000906001600160a01b03831690639961cee490613ea5908b90600401614c13565b60206040518083038186803b158015613ebd57600080fd5b505afa158015613ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ef59190614782565b90506000613fe4846001600160a01b0316631e72ba866040518163ffffffff1660e01b815260040160206040518083038186803b158015613f3557600080fd5b505afa158015613f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f6d9190614782565b866001600160a01b031663162adbfd6040518163ffffffff1660e01b815260040160206040518083038186803b158015613fa657600080fd5b505afa158015613fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fde9190614782565b9061440b565b9050600061406c876001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561402457600080fd5b505afa158015614038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405c9190614782565b614066848c61440b565b90614464565b905060006140ee886001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156140ac57600080fd5b505afa1580156140c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e49190614782565b614066858c61440b565b9050888a11156141b95780841161410c575050505050505050613c74565b600061411883836134f7565b9050600061412686846134f7565b9050818111156141335750805b6040517f052e56400000000000000000000000000000000000000000000000000000000081526001600160a01b038b169063052e564090614178908490600401614caa565b600060405180830381600087803b15801561419257600080fd5b505af11580156141a6573d6000803e3d6000fd5b5050505050505050505050505050613c74565b89891115614241578184116141d5575050505050505050613c74565b60006141e182846134f7565b905060006141ef86856134f7565b9050818111156141fc5750805b6040517fb58d89d30000000000000000000000000000000000000000000000000000000081526001600160a01b038b169063b58d89d390614178908490600401614caa565b5050505050505050505050565b60008054604080517febb9d8c9000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263ebb9d8c99260448084019382900301818387803b1580156136cd57600080fd5b60008054604080517f616b59f60000000000000000000000000000000000000000000000000000000081526004810185905290516101009092046001600160a01b03169263616b59f69260248084019382900301818387803b15801561431f57600080fd5b505af1158015614333573d6000803e3d6000fd5b5050505050565b60008054604080517f0e14a3760000000000000000000000000000000000000000000000000000000081526004810185905290516101009092046001600160a01b031692630e14a3769260248084019382900301818387803b15801561431f57600080fd5b60008054604080517fadb353dc000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263adb353dc9260448084019382900301818387803b1580156136cd57600080fd5b60008261441a575060006116b8565b8282028284828161442757fe5b04146106085760405162461bcd60e51b81526004018080602001828103825260218152602001806150376021913960400191505060405180910390fd5b60008082116144ba576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816144c357fe5b049392505050565b604080516102808101825260008082526020820181905260609282018390529181018290526080810182905260a0810182905260c081018290529060e0820190815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082018190526101208201819052610140820181905261016082018190526101809091015290565b60006020828403121561457b578081fd5b813561060881614ff0565b600060208284031215614597578081fd5b815161060881614ff0565b6000806000606084860312156145b6578182fd5b83356145c181614ff0565b925060208401356145d181615008565b929592945050506040919091013590565b600080604083850312156145f4578182fd5b82356145ff81614ff0565b946020939093013593505050565b60006020828403121561461e578081fd5b81518015158114610608578182fd5b6000806020838503121561463f578182fd5b823567ffffffffffffffff80821115614656578384fd5b818501915085601f830112614669578384fd5b813581811115614677578485fd5b866020828501011115614688578485fd5b60209290920196919550909350505050565b600060208083850312156146ac578182fd5b823567ffffffffffffffff808211156146c3578384fd5b818501915085601f8301126146d6578384fd5b8135818111156146e257fe5b60405184601f19601f84011682010181811084821117156146ff57fe5b6040528181528382018501881015614715578586fd5b818585018683013790810190930193909352509392505050565b600060208284031215614740578081fd5b815161060881615008565b60006020828403121561475c578081fd5b815160058110610608578182fd5b60006020828403121561477b578081fd5b5035919050565b600060208284031215614793578081fd5b5051919050565b600080604083850312156147ac578182fd5b50508035926020909101359150565b6001600160a01b03169052565b15159052565b600081518084526147e6816020860160208601614fc4565b601f01601f19169290920160200192915050565b6004811061480457fe5b9052565b6005811061480457fe5b7fff000000000000000000000000000000000000000000000000000000000000009390931683527fffffffffffffffffffffff00000000000000000000000000000000000000000091909116600183015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600c82015260200190565b7f6e6f64652e6d696e69706f6f6c732e76616c69646174696e672e696e64657800815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601f82015260330190565b7f6e6f64652e6d696e69706f6f6c732e66696e616c697365642e636f756e740000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601e82015260320190565b7f6d696e69706f6f6c2e64657374726f7965640000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601282015260260190565b7f6d696e69706f6f6c732e7374616b696e672e636f756e74000000000000000000815260170190565b7f6e6f64652e6d696e69706f6f6c732e696e646578000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601482015260280190565b7f6d696e69706f6f6c2e7075626b65790000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f82015260230190565b7f6e6f64652e6d696e69706f6f6c732e7374616b696e672e636f756e7400000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601c82015260300190565b7f6d696e69706f6f6c2e6578697374730000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f82015260230190565b60007f76616c696461746f722e6d696e69706f6f6c00000000000000000000000000008252828460128401379101601201908152919050565b60007f76616c696461746f722e6d696e69706f6f6c000000000000000000000000000082528251614b87816012850160208701614fc4565b9190910160120192915050565b7f6e6f64652e617665726167652e6665652e6e756d657261746f72000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601a820152602e0190565b7f6d696e69706f6f6c732e696e64657800000000000000000000000000000000008152600f0190565b6001600160a01b0391909116815260200190565b6001600160a01b038416815260608101614c4460208301856147fa565b826040830152949350505050565b6020808252825182820181905260009190848201906040850190845b81811015614c935783516001600160a01b031683529284019291840191600101614c6e565b50909695505050505050565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b60006020825261060860208301846147ce565b60408101614cf982856147fa565b6001600160a01b03831660208301529392505050565b6020808252601d908201527f476c6f62616c206d696e69706f6f6c206c696d69742072656163686564000000604082015260600190565b6020808252601b908201527f4469737472696275746f72206e6f7420696e697469616c697365640000000000604082015260600190565b60208082526042908201527f4d696e69706f6f6c20636f756e74206166746572206465706f7369742065786360408201527f65656473206c696d6974206261736564206f6e206e6f64652052504c2073746160608201527f6b65000000000000000000000000000000000000000000000000000000000000608082015260a00190565b6020808252601b908201527f4e6574776f726b206973206e6f7420696e20636f6e73656e7375730000000000604082015260600190565b600060208252614e4b6020830184516147c8565b6020830151614e5d60408401826147bb565b506040830151610280806060850152614e7a6102a08501836147ce565b91506060850151614e8e6080860182614808565b50608085015160a085015260a085015160c085015260c0850151614eb560e08601826147c8565b5060e0850151610100614eca818701836147fa565b86015161012086810191909152860151610140808701919091528601519050610160614ef8818701836147c8565b8601516101808681019190915286015190506101a0614f19818701836147c8565b8601516101c08681019190915286015190506101e0614f3a818701836147c8565b8601519050610200614f4e868201836147bb565b8601519050610220614f62868201836147bb565b8601519050610240614f76868201836147bb565b860151610260868101919091529095015193019290925250919050565b948552602085019390935260408401919091526060830152608082015260a00190565b60ff91909116815260200190565b60005b83811015614fdf578181015183820152602001614fc7565b838111156130155750506000910152565b6001600160a01b038116811461500557600080fd5b50565b6004811061500557600080fdfe726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212208971d8b47ed125e8951a441cd2b71997e7e509eededdf4c64e8f1725e0ab4db864736f6c63430007060033

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

0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.