ETH Price: $3,326.21 (-2.27%)

Contract

0xEf6f9ca7617cCD188350F9fCC6010c471EDF6A5C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake RPL174462962023-06-10 0:43:47587 days ago1686357827IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0004749916
Withdraw RPL171002232023-04-22 6:52:59635 days ago1682146379IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.000885329.77601619
Stake RPL170698932023-04-17 23:58:59640 days ago1681775939IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0077769136.58552344
Stake RPL170698882023-04-17 23:57:59640 days ago1681775879IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0066446834
Stake RPL170698862023-04-17 23:57:35640 days ago1681775855IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0072014736.85128062
Stake RPL170698402023-04-17 23:47:47640 days ago1681775267IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0070139533
Stake RPL170698242023-04-17 23:44:35640 days ago1681775075IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.006589631
Stake RPL170696892023-04-17 23:17:11640 days ago1681773431IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0064515333.0136958
Withdraw RPL170695762023-04-17 22:54:11640 days ago1681772051IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0039629734.11713562
Withdraw RPL170695622023-04-17 22:51:23640 days ago1681771883IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.004051334.87751011
Withdraw RPL170695082023-04-17 22:40:35640 days ago1681771235IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.006261330
Stake RPL170692402023-04-17 21:46:23640 days ago1681767983IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0058629630
Withdraw RPL170692202023-04-17 21:42:11640 days ago1681767731IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0073438635.18692267
Stake RPL170691982023-04-17 21:37:47640 days ago1681767467IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0079920640.89433791
Stake RPL170686372023-04-17 19:43:59640 days ago1681760639IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0074532541.78418059
Stake RPL170685902023-04-17 19:34:35640 days ago1681760075IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.008610840.51305233
Stake RPL170685602023-04-17 19:28:23640 days ago1681759703IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0091359142.97877439
Withdraw RPL170684512023-04-17 19:06:11640 days ago1681758371IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0156693375.07022599
Withdraw RPL170684022023-04-17 18:56:11640 days ago1681757771IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0071474334.24381699
Withdraw RPL170682102023-04-17 18:16:47640 days ago1681755407IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0072272834.62838187
Withdraw RPL170681322023-04-17 18:01:11640 days ago1681754471IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0077213837
Withdraw RPL170680982023-04-17 17:53:59640 days ago1681754039IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0079297435.11690366
Withdraw RPL170680652023-04-17 17:47:23640 days ago1681753643IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0100513444.51338354
Withdraw RPL170680592023-04-17 17:46:11640 days ago1681753571IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0056157148.34551467
Withdraw RPL170678102023-04-17 16:55:59640 days ago1681750559IN
0xEf6f9ca7...71EDF6A5C
0 ETH0.0079394235.15974766
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RocketNodeStaking

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 15000 runs

Other Settings:
default evmVersion, GNU GPLv3 license
File 1 of 20 : RocketNodeStaking.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 "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "../RocketBase.sol";
import "../../interface/minipool/RocketMinipoolManagerInterface.sol";
import "../../interface/network/RocketNetworkPricesInterface.sol";
import "../../interface/node/RocketNodeStakingInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol";
import "../../interface/RocketVaultInterface.sol";
import "../../interface/util/AddressSetStorageInterface.sol";

// Handles node deposits and minipool creation

contract RocketNodeStaking is RocketBase, RocketNodeStakingInterface {

    // Libs
    using SafeMath for uint;

    // Events
    event RPLStaked(address indexed from, uint256 amount, uint256 time);
    event RPLWithdrawn(address indexed to, uint256 amount, uint256 time);
    event RPLSlashed(address indexed node, uint256 amount, uint256 ethValue, uint256 time);

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

    // Get/set the total RPL stake amount
    function getTotalRPLStake() override external view returns (uint256) {
        return getUint(keccak256("rpl.staked.total.amount"));
    }
    function increaseTotalRPLStake(uint256 _amount) private {
        addUint(keccak256("rpl.staked.total.amount"), _amount);
    }
    function decreaseTotalRPLStake(uint256 _amount) private {
        subUint(keccak256("rpl.staked.total.amount"), _amount);
    }

    // Get/set a node's RPL stake amount
    function getNodeRPLStake(address _nodeAddress) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("rpl.staked.node.amount", _nodeAddress)));
    }
    function increaseNodeRPLStake(address _nodeAddress, uint256 _amount) private {
        addUint(keccak256(abi.encodePacked("rpl.staked.node.amount", _nodeAddress)), _amount);
    }
    function decreaseNodeRPLStake(address _nodeAddress, uint256 _amount) private {
        subUint(keccak256(abi.encodePacked("rpl.staked.node.amount", _nodeAddress)), _amount);
    }

    // Get/set the time a node last staked RPL at
    function getNodeRPLStakedTime(address _nodeAddress) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("rpl.staked.node.time", _nodeAddress)));
    }
    function setNodeRPLStakedTime(address _nodeAddress, uint256 _time) private {
        setUint(keccak256(abi.encodePacked("rpl.staked.node.time", _nodeAddress)), _time);
    }

    // Get the total effective RPL stake amount
    function getTotalEffectiveRPLStake() override external view returns (uint256) {
        // Load contracts
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        return rocketNetworkPrices.getEffectiveRPLStake();
    }

    // Calculate total effective RPL stake, this features a potentially unbounded loop so can not be called on-chain
    // Instead, it is intended to be called by oracle nodes to be submitted alongside price updates
    function calculateTotalEffectiveRPLStake(uint256 offset, uint256 limit, uint256 rplPrice) override external view returns (uint256) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Calculate current max RPL stake per minipool
        uint256 maxRplStakePerMinipool = rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
            .mul(rocketDAOProtocolSettingsNode.getMaximumPerMinipoolStake());
        // Loop all nodes and calculate their effective rate to sum
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        bytes32 key = keccak256("nodes.index");
        uint256 totalNodes = addressSetStorage.getCount(key);
        uint256 max = offset.add(limit);
        if (max > totalNodes || limit == 0) { max = totalNodes; }
        uint256 total = 0;
        for (uint i = offset; i < max; i++){
            // Get the node's address from the set
            address nodeAddress = addressSetStorage.getItem(key, i);
            // Get node's current RPL stake
            uint256 rplStake = getNodeRPLStake(nodeAddress);
            uint256 maxRplStake = maxRplStakePerMinipool.mul(rocketMinipoolManager.getNodeStakingMinipoolCount(nodeAddress)).div(rplPrice);
            // Calculate node's maximum RPL stake
            if (rplStake < maxRplStake) { total = total.add(rplStake); }
            else { total = total.add(maxRplStake); }
        }
        return total;
    }

    // Get a node's effective RPL stake amount
    function getNodeEffectiveRPLStake(address _nodeAddress) override external view returns (uint256) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Get node's current RPL stake
        uint256 rplStake = getNodeRPLStake(_nodeAddress);
        // Calculate node's maximum RPL stake
        uint256 maxRplStake = rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
            .mul(rocketDAOProtocolSettingsNode.getMaximumPerMinipoolStake())
            .mul(rocketMinipoolManager.getNodeStakingMinipoolCount(_nodeAddress))
            .div(rocketNetworkPrices.getRPLPrice());
        // Return effective stake amount
        if (rplStake < maxRplStake) { return rplStake; }
        else { return maxRplStake; }
    }

    // Get a node's minimum RPL stake to collateralize their minipools
    function getNodeMinimumRPLStake(address _nodeAddress) override external view returns (uint256) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Calculate minimum RPL stake
        return rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
            .mul(rocketDAOProtocolSettingsNode.getMinimumPerMinipoolStake())
            .mul(rocketMinipoolManager.getNodeActiveMinipoolCount(_nodeAddress))
            .div(rocketNetworkPrices.getRPLPrice());
    }

    // Get a node's maximum RPL stake to fully collateralize their minipools
    function getNodeMaximumRPLStake(address _nodeAddress) override public view returns (uint256) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Calculate maximum RPL stake
        return rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
            .mul(rocketDAOProtocolSettingsNode.getMaximumPerMinipoolStake())
            .mul(rocketMinipoolManager.getNodeActiveMinipoolCount(_nodeAddress))
            .div(rocketNetworkPrices.getRPLPrice());
    }

    // Get a node's minipool limit based on RPL stake
    function getNodeMinipoolLimit(address _nodeAddress) override external view returns (uint256) {
        // Load contracts
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Calculate & return minipool limit
        return getNodeRPLStake(_nodeAddress)
            .mul(rocketNetworkPrices.getRPLPrice())
            .div(
                rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
                .mul(rocketDAOProtocolSettingsNode.getMinimumPerMinipoolStake())
            );
    }

    // Accept an RPL stake
    // Only accepts calls from registered nodes
    function stakeRPL(uint256 _amount) override external onlyLatestContract("rocketNodeStaking", address(this)) onlyRegisteredNode(msg.sender) {
        _stakeRPL(msg.sender, _amount);
    }

    // Accept an RPL stake from any address for a specified node
    function stakeRPLFor(address _nodeAddress, uint256 _amount) override external onlyLatestContract("rocketNodeStaking", address(this)) onlyRegisteredNode(_nodeAddress) onlyLatestContract("rocketMerkleDistributorMainnet", msg.sender) {
        _stakeRPL(_nodeAddress, _amount);
    }

    function _stakeRPL(address _nodeAddress, uint256 _amount) internal {
        // Load contracts
        address rplTokenAddress = getContractAddress("rocketTokenRPL");
        address rocketVaultAddress = getContractAddress("rocketVault");
        IERC20 rplToken = IERC20(rplTokenAddress);
        RocketVaultInterface rocketVault = RocketVaultInterface(rocketVaultAddress);
        // Transfer RPL tokens
        require(rplToken.transferFrom(msg.sender, address(this), _amount), "Could not transfer RPL to staking contract");
        // Deposit RPL tokens to vault
        require(rplToken.approve(rocketVaultAddress, _amount), "Could not approve vault RPL deposit");
        rocketVault.depositToken("rocketNodeStaking", rplToken, _amount);
        // Get node's current stake
        uint256 rplStake = getNodeRPLStake(_nodeAddress);
        // Update RPL stake amounts & node RPL staked block
        increaseTotalRPLStake(_amount);
        increaseNodeRPLStake(_nodeAddress, _amount);
        updateTotalEffectiveRPLStake(_nodeAddress, rplStake, rplStake.add(_amount));
        setNodeRPLStakedTime(_nodeAddress, block.timestamp);
        // Emit RPL staked event
        emit RPLStaked(_nodeAddress, _amount, block.timestamp);
    }

    // Withdraw staked RPL back to the node account
    // Only accepts calls from registered nodes
    function withdrawRPL(uint256 _amount) override external onlyLatestContract("rocketNodeStaking", address(this)) onlyRegisteredNode(msg.sender) {
        // Load contracts
        RocketDAOProtocolSettingsRewardsInterface rocketDAOProtocolSettingsRewards = RocketDAOProtocolSettingsRewardsInterface(getContractAddress("rocketDAOProtocolSettingsRewards"));
        RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
        // Check cooldown period (one claim period) has passed since RPL last staked
        require(block.timestamp.sub(getNodeRPLStakedTime(msg.sender)) >= rocketDAOProtocolSettingsRewards.getRewardsClaimIntervalTime(), "The withdrawal cooldown period has not passed");
        // Get & check node's current RPL stake
        uint256 rplStake = getNodeRPLStake(msg.sender);
        require(rplStake >= _amount, "Withdrawal amount exceeds node's staked RPL balance");
        // Check withdrawal would not undercollateralize node
        require(rplStake.sub(_amount) >= getNodeMaximumRPLStake(msg.sender), "Node's staked RPL balance after withdrawal is less than required balance");
        // Update RPL stake amounts
        decreaseTotalRPLStake(_amount);
        decreaseNodeRPLStake(msg.sender, _amount);
        updateTotalEffectiveRPLStake(msg.sender, rplStake, rplStake.sub(_amount));
        // Transfer RPL tokens to node address
        rocketVault.withdrawToken(rocketStorage.getNodeWithdrawalAddress(msg.sender), IERC20(getContractAddress("rocketTokenRPL")), _amount);
        // Emit RPL withdrawn event
        emit RPLWithdrawn(msg.sender, _amount, block.timestamp);
    }

    // Updates the stored total effective rate based on a node's changing staking balance
    function updateTotalEffectiveRPLStake(address _nodeAddress, uint256 _oldStake, uint256 _newStake) private {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Require price consensus
        require(rocketNetworkPrices.inConsensus(), "Network is not in consensus");
        // Get the node's maximum possible stake
        uint256 maxRplStake = rocketDAOProtocolSettingsMinipool.getHalfDepositUserAmount()
            .mul(rocketDAOProtocolSettingsNode.getMaximumPerMinipoolStake())
            .mul(rocketMinipoolManager.getNodeStakingMinipoolCount(_nodeAddress))
            .div(rocketNetworkPrices.getRPLPrice());
        // Easy out if total stake isn't changing
        if (_oldStake >= maxRplStake && _newStake >= maxRplStake) {
            return;
        }
        // Check if we have to decrease total
        if (_oldStake > _newStake) {
            uint256 decrease = _oldStake.sub(_newStake);
            uint256 delta = maxRplStake.sub(_newStake);
            if (decrease < delta) { delta = decrease; }
            rocketNetworkPrices.decreaseEffectiveRPLStake(delta);
            return;
        }
        // Check if we have to increase total
        if (_newStake > _oldStake) {
            uint256 increase = _newStake.sub(_oldStake);
            uint256 delta = maxRplStake.sub(_oldStake);
            if (delta > increase) { delta = increase; }
            rocketNetworkPrices.increaseEffectiveRPLStake(delta);
        }
        // _oldStake == _newStake (do nothing but shouldn't happen)
    }

    // Slash a node's RPL by an ETH amount
    // Only accepts calls from registered minipools
    function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) override external onlyLatestContract("rocketNodeStaking", address(this)) onlyRegisteredMinipool(msg.sender) {
        // Load contracts
        RocketNetworkPricesInterface rocketNetworkPrices = RocketNetworkPricesInterface(getContractAddress("rocketNetworkPrices"));
        RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
        // Calculate RPL amount to slash
        uint256 rplSlashAmount = calcBase.mul(_ethSlashAmount).div(rocketNetworkPrices.getRPLPrice());
        // Cap slashed amount to node's RPL stake
        uint256 rplStake = getNodeRPLStake(_nodeAddress);
        if (rplSlashAmount > rplStake) { rplSlashAmount = rplStake; }
        // Transfer slashed amount to auction contract
        if(rplSlashAmount > 0) rocketVault.transferToken("rocketAuctionManager", IERC20(getContractAddress("rocketTokenRPL")), rplSlashAmount);
        // Update RPL stake amounts
        decreaseTotalRPLStake(rplSlashAmount);
        decreaseNodeRPLStake(_nodeAddress, rplSlashAmount);
        updateTotalEffectiveRPLStake(_nodeAddress, rplStake, rplStake.sub(rplSlashAmount));
        // Emit RPL slashed event
        emit RPLSlashed(_nodeAddress, rplSlashAmount, _ethSlashAmount, block.timestamp);
    }

}

File 2 of 20 : 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 20 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 4 of 20 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./ERC20.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    using SafeMath for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}

File 5 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 6 of 20 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

pragma solidity >0.5.0 <0.9.0;

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

interface RocketStorageInterface {

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

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

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

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

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

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

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

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

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";

interface RocketVaultInterface {
    function balanceOf(string memory _networkContractName) external view returns (uint256);
    function depositEther() external payable;
    function withdrawEther(uint256 _amount) external;
    function depositToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external;
    function withdrawToken(address _withdrawalAddress, IERC20 _tokenAddress, uint256 _amount) external;
    function balanceOfToken(string memory _networkContractName, IERC20 _tokenAddress) external view returns (uint256);
    function transferToken(string memory _networkContractName, IERC20 _tokenAddress, uint256 _amount) external;
    function burnToken(ERC20Burnable _tokenAddress, uint256 _amount) external;
}

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

pragma solidity >0.5.0 <0.9.0;

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

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

interface RocketDAOProtocolSettingsMinipoolInterface {
    function getLaunchBalance() external view returns (uint256);
    function 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 11 of 20 : RocketDAOProtocolSettingsNodeInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |  DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0  |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned,
  *  decentralised, trustless and compatible with staking in Ethereum 2.0.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDAOProtocolSettingsNodeInterface {
    function getRegistrationEnabled() external view returns (bool);
    function getSmoothingPoolRegistrationEnabled() external view returns (bool);
    function getDepositEnabled() external view returns (bool);
    function getMinimumPerMinipoolStake() external view returns (uint256);
    function getMaximumPerMinipoolStake() external view returns (uint256);
}

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

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDAOProtocolSettingsRewardsInterface {
    function setSettingRewardsClaimer(string memory _contractName, uint256 _perc) external;
    function getRewardsClaimerPerc(string memory _contractName) external view returns (uint256);
    function getRewardsClaimerPercTimeUpdated(string memory _contractName) external view returns (uint256);
    function getRewardsClaimersPercTotal() external view returns (uint256);
    function getRewardsClaimIntervalTime() external view returns (uint256);
}

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

pragma solidity >0.5.0 <0.9.0;
pragma abicoder v2;

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

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

interface RocketMinipoolManagerInterface {
    function getMinipoolCount() external view returns (uint256);
    function getStakingMinipoolCount() external view returns (uint256);
    function getFinalisedMinipoolCount() external view returns (uint256);
    function getActiveMinipoolCount() external view returns (uint256);
    function 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 15 of 20 : 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.5.0 <0.9.0;

// 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 16 of 20 : 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.5.0 <0.9.0;

// 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 17 of 20 : 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.5.0 <0.9.0;

// 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 18 of 20 : 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 19 of 20 : 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 20 of 20 : 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
}

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":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RPLSlashed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RPLStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RPLWithdrawn","type":"event"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"uint256","name":"rplPrice","type":"uint256"}],"name":"calculateTotalEffectiveRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeEffectiveRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeMaximumRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeMinimumRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeMinipoolLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeRPLStakedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalEffectiveRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalRPLStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_ethSlashAmount","type":"uint256"}],"name":"slashRPL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeRPL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeRPLFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawRPL","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260008054610100600160a81b031916905534801561002157600080fd5b506040516131523803806131528339818101604052602081101561004457600080fd5b50516000805460ff196001600160a01b0390931661010002610100600160a81b0319909116179190911660031790556130d0806100826000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806390f7ff4c1161008c578063c0d05dd811610066578063c0d05dd81461022f578063cb1c832114610255578063e8e34cc214610281578063f0d19b89146102aa576100ea565b806390f7ff4c146101db5780639961cee4146102015780639a206c8e14610227576100ea565b80634b24426d116100c85780634b24426d146101725780634e58ff6e1461017a57806354fd4d50146101a05780636b088d5c146101be576100ea565b806303fa87b4146100ef578063245395a6146101275780633e200d4b14610155575b600080fd5b6101156004803603602081101561010557600080fd5b50356001600160a01b03166102d0565b60408051918252519081900360200190f35b6101536004803603604081101561013d57600080fd5b506001600160a01b0381351690602001356105e2565b005b6101536004803603602081101561016b57600080fd5b5035610a81565b610115610c52565b6101156004803603602081101561019057600080fd5b50356001600160a01b0316610d00565b6101a8610f43565b6040805160ff9092168252519081900360200190f35b610153600480360360208110156101d457600080fd5b5035610f4c565b610115600480360360208110156101f157600080fd5b50356001600160a01b0316611495565b6101156004803603602081101561021757600080fd5b50356001600160a01b031661167d565b6101156116e8565b6101156004803603602081101561024557600080fd5b50356001600160a01b0316611718565b6101536004803603604081101561026b57600080fd5b506001600160a01b03813516906020013561177d565b6101156004803603606081101561029757600080fd5b5080359060208101359060400135611a73565b610115600480360360208110156102c057600080fd5b50356001600160a01b0316611e41565b6000806103116040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b905060006103366040518060600160405280602181526020016130266021913961213c565b905060006103786040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b905060006103ba6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506105d6826001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f857600080fd5b505afa15801561040c573d6000803e3d6000fd5b505050506040513d602081101561042257600080fd5b5051604080517f1844ec010000000000000000000000000000000000000000000000000000000081526001600160a01b038a8116600483015291516105d092891691631844ec01916024808301926020929190829003018186803b15801561048957600080fd5b505afa15801561049d573d6000803e3d6000fd5b505050506040513d60208110156104b357600080fd5b5051604080517f6fdbe57b00000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b03881691636fdbe57b91600480820192602092909190829003018186803b15801561051357600080fd5b505afa158015610527573d6000803e3d6000fd5b505050506040513d602081101561053d57600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b038b169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b505afa1580156105ac573d6000803e3d6000fd5b505050506040513d60208110156105c257600080fd5b505190612217565b90612217565b90612277565b9450505050505b919050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250306106d58260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b6020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001206122de565b6001600160a01b0316816001600160a01b03161461073a576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f84015283516023818503018152604390930190935281519101206107939061236a565b6107e4576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006108246040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b905060006108666040518060400160405280600b81526020017f726f636b65745661756c7400000000000000000000000000000000000000000081525061213c565b905060006108e4836001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a657600080fd5b505afa1580156108ba573d6000803e3d6000fd5b505050506040513d60208110156108d057600080fd5b50516105d0670de0b6b3a76400008a612217565b905060006108f18961167d565b9050808211156108ff578091505b8115610a0457826001600160a01b031663ee91035e6109526040518060400160405280600e81526020017f726f636b6574546f6b656e52504c00000000000000000000000000000000000081525061213c565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660248301526044820186905260606004830152601460648301527f726f636b657441756374696f6e4d616e6167657200000000000000000000000060848301525160a480830192600092919082900301818387803b1580156109eb57600080fd5b505af11580156109ff573d6000803e3d6000fd5b505050505b610a0d826123c4565b610a1789836123f1565b610a2b8982610a268186612459565b6124b6565b60408051838152602081018a9052428183015290516001600160a01b038b16917f38a2777b6a84fdb3fc375fe8ade69fdad1afdcdd93c79e7ae2319b806a626c4d919081900360600190a2505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525030610b338260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614610b98576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120610bf19061236a565b610c42576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b610c4c3385612905565b50505050565b600080610c936040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b9050806001600160a01b0316635cb8299e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cce57600080fd5b505afa158015610ce2573d6000803e3d6000fd5b505050506040513d6020811015610cf857600080fd5b505191505090565b600080610d416040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b90506000610d666040518060600160405280602181526020016130266021913961213c565b90506000610da86040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b90506000610dea6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506105d6826001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2857600080fd5b505afa158015610e3c573d6000803e3d6000fd5b505050506040513d6020811015610e5257600080fd5b5051604080517f1844ec010000000000000000000000000000000000000000000000000000000081526001600160a01b038a8116600483015291516105d092891691631844ec01916024808301926020929190829003018186803b158015610eb957600080fd5b505afa158015610ecd573d6000803e3d6000fd5b505050506040513d6020811015610ee357600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b03881691631e72ba8691600480820192602092909190829003018186803b15801561051357600080fd5b60005460ff1681565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525030610ffe8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614611063576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206110bc9061236a565b61110d576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b600061114d6040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e67735265776172647381525061213c565b9050600061118f6040518060400160405280600b81526020017f726f636b65745661756c7400000000000000000000000000000000000000000081525061213c565b9050816001600160a01b03166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b1580156111ca57600080fd5b505afa1580156111de573d6000803e3d6000fd5b505050506040513d60208110156111f457600080fd5b505161120961120233611718565b4290612459565b10156112465760405162461bcd60e51b815260040180806020018281038252602d815260200180612f64602d913960400191505060405180910390fd5b60006112513361167d565b9050868110156112925760405162461bcd60e51b81526004018080602001828103825260338152602001806130686033913960400191505060405180910390fd5b61129b33610d00565b6112a58289612459565b10156112e25760405162461bcd60e51b8152600401808060200182810382526048815260200180612fde6048913960600191505060405180910390fd5b6112eb876123c4565b6112f533886123f1565b6113043382610a26818b612459565b600054604080517f5b49ff6200000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03808616936301e336679361010090910490911691635b49ff6291602480820192602092909190829003018186803b15801561137857600080fd5b505afa15801561138c573d6000803e3d6000fd5b505050506040513d60208110156113a257600080fd5b505160408051808201909152600e81527f726f636b6574546f6b656e52504c00000000000000000000000000000000000060208201526113e19061213c565b8a6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b5050604080518a815242602082015281513394507f9947063f70b076145616018b82ed1dd5585e15b7ae0a0b17a8b06bec4c4c31e293509081900390910190a250505050505050565b6000806114b96040518060600160405280602181526020016130266021913961213c565b905060006114fb6040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b9050600061153d6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b9050611674611603826001600160a01b0316636fdbe57b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561157e57600080fd5b505afa158015611592573d6000803e3d6000fd5b505050506040513d60208110156115a857600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b0388169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b6105d0846001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561163f57600080fd5b505afa158015611653573d6000803e3d6000fd5b505050506040513d602081101561166957600080fd5b50516105ca8961167d565b95945050505050565b60006116e28260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e7400000000000000000000815250601601826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c5d565b92915050565b60006117137fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a306612c5d565b905090565b60006116e28260405160200180807f72706c2e7374616b65642e6e6f64652e74696d65000000000000000000000000815250601401826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c5d565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152503061182f8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614611894576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b836118f88160405160200180807f6e6f64652e657869737473000000000000000000000000000000000000000000815250600b01826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012061236a565b611949576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6040518060400160405280601e81526020017f726f636b65744d65726b6c654469737472696275746f724d61696e6e65740000815250336119fb8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614611a60576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b611a6a8787612905565b50505050505050565b600080611ab46040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b90506000611ad96040518060600160405280602181526020016130266021913961213c565b90506000611b1b6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506000611be0826001600160a01b0316631e72ba866040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5b57600080fd5b505afa158015611b6f573d6000803e3d6000fd5b505050506040513d6020811015611b8557600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b0387169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b90506000611c226040518060400160405280601181526020017f6164647265737353657453746f7261676500000000000000000000000000000081525061213c565b905060007fb2fc74f0e3003fa42ac709f1c47d79ed4358e153eb2c56feab0a097a0f28770590506000826001600160a01b031663c9d6fee9836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b505190506000611cc98c8c612cb7565b905081811180611cd757508a155b15611cdf5750805b60008c5b82811015611e30576000866001600160a01b031663f3358a3a87846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611d3957600080fd5b505afa158015611d4d573d6000803e3d6000fd5b505050506040513d6020811015611d6357600080fd5b505190506000611d728261167d565b90506000611dfd8f6105d08f6001600160a01b03166357b4ef6b876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611dca57600080fd5b505afa158015611dde573d6000803e3d6000fd5b505050506040513d6020811015611df457600080fd5b50518d90612217565b905080821015611e1857611e118583612cb7565b9450611e25565b611e228582612cb7565b94505b505050600101611ce3565b509c9b505050505050505050505050565b600080611e826040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b90506000611ea76040518060600160405280602181526020016130266021913961213c565b90506000611ee96040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b90506000611f2b6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506000611f388761167d565b90506000612118846001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7857600080fd5b505afa158015611f8c573d6000803e3d6000fd5b505050506040513d6020811015611fa257600080fd5b5051604080517f57b4ef6b0000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015291516105d0928b16916357b4ef6b916024808301926020929190829003018186803b15801561200957600080fd5b505afa15801561201d573d6000803e3d6000fd5b505050506040513d602081101561203357600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b038a1691631e72ba8691600480820192602092909190829003018186803b15801561209357600080fd5b505afa1580156120a7573d6000803e3d6000fd5b505050506040513d60208110156120bd57600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b038d169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b90508082101561212f575094506105dd9350505050565b95506105dd945050505050565b6000806121ba8360405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b90506001600160a01b0381166116e2576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b600082612226575060006116e2565b8282028284828161223357fe5b04146122705760405162461bcd60e51b81526004018080602001828103825260218152602001806130476021913960400191505060405180910390fd5b9392505050565b60008082116122cd576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816122d657fe5b049392505050565b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561233857600080fd5b505afa15801561234c573d6000803e3d6000fd5b505050506040513d602081101561236257600080fd5b505192915050565b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561233857600080fd5b6123ee7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a30682612d11565b50565b6124558260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e7400000000000000000000815250601601826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012082612d11565b5050565b6000828211156124b0576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124f66040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b905060006125386040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b9050600061255d6040518060600160405280602181526020016130266021913961213c565b9050600061259f6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b9050826001600160a01b03166337ab50046040518163ffffffff1660e01b815260040160206040518083038186803b1580156125da57600080fd5b505afa1580156125ee573d6000803e3d6000fd5b505050506040513d602081101561260457600080fd5b5051612657576040805162461bcd60e51b815260206004820152601b60248201527f4e6574776f726b206973206e6f7420696e20636f6e73656e7375730000000000604482015290519081900360640190fd5b60006127b0846001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561269557600080fd5b505afa1580156126a9573d6000803e3d6000fd5b505050506040513d60208110156126bf57600080fd5b5051604080517f57b4ef6b0000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015291516105d0928a16916357b4ef6b916024808301926020929190829003018186803b15801561272657600080fd5b505afa15801561273a573d6000803e3d6000fd5b505050506040513d602081101561275057600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b03891691631e72ba8691600480820192602092909190829003018186803b15801561051357600080fd5b90508087101580156127c25750808610155b156127d1575050505050612900565b8587111561286a5760006127e58888612459565b905060006127f38389612459565b9050808210156128005750805b856001600160a01b031663052e5640826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561284657600080fd5b505af115801561285a573d6000803e3d6000fd5b5050505050505050505050612900565b868611156128fa57600061287e8789612459565b9050600061288c838a612459565b9050818111156128995750805b856001600160a01b031663b58d89d3826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156128df57600080fd5b505af11580156128f3573d6000803e3d6000fd5b5050505050505b50505050505b505050565b60006129456040518060400160405280600e81526020017f726f636b6574546f6b656e52504c00000000000000000000000000000000000081525061213c565b905060006129876040518060400160405280600b81526020017f726f636b65745661756c7400000000000000000000000000000000000000000081525061213c565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690529051919250839183916001600160a01b038416916323b872dd916064808201926020929091908290030181600087803b1580156129fd57600080fd5b505af1158015612a11573d6000803e3d6000fd5b505050506040513d6020811015612a2757600080fd5b5051612a645760405162461bcd60e51b815260040180806020018281038252602a815260200180612f91602a913960400191505060405180910390fd5b816001600160a01b031663095ea7b384876040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612abb57600080fd5b505af1158015612acf573d6000803e3d6000fd5b505050506040513d6020811015612ae557600080fd5b5051612b225760405162461bcd60e51b8152600401808060200182810382526023815260200180612fbb6023913960400191505060405180910390fd5b604080517ff44429580000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660248301526044820188905260606004830152601160648301527f726f636b65744e6f64655374616b696e67000000000000000000000000000000608483015291519183169163f44429589160a48082019260009290919082900301818387803b158015612bc157600080fd5b505af1158015612bd5573d6000803e3d6000fd5b505050506000612be48761167d565b9050612bef86612d99565b612bf98787612dc3565b612c088782610a26818a612cb7565b612c128742612e27565b6040805187815242602082015281516001600160a01b038a16927f4e3bcb61bb8e63cb9ed2c46d47eeb6ae847c629e909fbb32b9d17874affb4a89928290030190a250505050505050565b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561233857600080fd5b600082820183811015612270576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008054604080517febb9d8c9000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263ebb9d8c99260448084019382900301818387803b158015612d7d57600080fd5b505af1158015612d91573d6000803e3d6000fd5b505050505050565b6123ee7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a30682612e8b565b6124558260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e7400000000000000000000815250601601826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012082612e8b565b6124558260405160200180807f72706c2e7374616b65642e6e6f64652e74696d65000000000000000000000000815250601401826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012082612ef7565b60008054604080517fadb353dc000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263adb353dc9260448084019382900301818387803b158015612d7d57600080fd5b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b158015612d7d57600080fdfe546865207769746864726177616c20636f6f6c646f776e20706572696f6420686173206e6f7420706173736564436f756c64206e6f74207472616e736665722052504c20746f207374616b696e6720636f6e7472616374436f756c64206e6f7420617070726f7665207661756c742052504c206465706f7369744e6f64652773207374616b65642052504c2062616c616e6365206166746572207769746864726177616c206973206c657373207468616e2072657175697265642062616c616e6365726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775769746864726177616c20616d6f756e742065786365656473206e6f64652773207374616b65642052504c2062616c616e6365a2646970667358221220d5fd2ea364577fe2e2cb2bee9fce2ef535eaabe3908d5ddf56465ac6422d47af64736f6c634300070600330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806390f7ff4c1161008c578063c0d05dd811610066578063c0d05dd81461022f578063cb1c832114610255578063e8e34cc214610281578063f0d19b89146102aa576100ea565b806390f7ff4c146101db5780639961cee4146102015780639a206c8e14610227576100ea565b80634b24426d116100c85780634b24426d146101725780634e58ff6e1461017a57806354fd4d50146101a05780636b088d5c146101be576100ea565b806303fa87b4146100ef578063245395a6146101275780633e200d4b14610155575b600080fd5b6101156004803603602081101561010557600080fd5b50356001600160a01b03166102d0565b60408051918252519081900360200190f35b6101536004803603604081101561013d57600080fd5b506001600160a01b0381351690602001356105e2565b005b6101536004803603602081101561016b57600080fd5b5035610a81565b610115610c52565b6101156004803603602081101561019057600080fd5b50356001600160a01b0316610d00565b6101a8610f43565b6040805160ff9092168252519081900360200190f35b610153600480360360208110156101d457600080fd5b5035610f4c565b610115600480360360208110156101f157600080fd5b50356001600160a01b0316611495565b6101156004803603602081101561021757600080fd5b50356001600160a01b031661167d565b6101156116e8565b6101156004803603602081101561024557600080fd5b50356001600160a01b0316611718565b6101536004803603604081101561026b57600080fd5b506001600160a01b03813516906020013561177d565b6101156004803603606081101561029757600080fd5b5080359060208101359060400135611a73565b610115600480360360208110156102c057600080fd5b50356001600160a01b0316611e41565b6000806103116040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b905060006103366040518060600160405280602181526020016130266021913961213c565b905060006103786040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b905060006103ba6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506105d6826001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156103f857600080fd5b505afa15801561040c573d6000803e3d6000fd5b505050506040513d602081101561042257600080fd5b5051604080517f1844ec010000000000000000000000000000000000000000000000000000000081526001600160a01b038a8116600483015291516105d092891691631844ec01916024808301926020929190829003018186803b15801561048957600080fd5b505afa15801561049d573d6000803e3d6000fd5b505050506040513d60208110156104b357600080fd5b5051604080517f6fdbe57b00000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b03881691636fdbe57b91600480820192602092909190829003018186803b15801561051357600080fd5b505afa158015610527573d6000803e3d6000fd5b505050506040513d602081101561053d57600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b038b169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b505afa1580156105ac573d6000803e3d6000fd5b505050506040513d60208110156105c257600080fd5b505190612217565b90612217565b90612277565b9450505050505b919050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250306106d58260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b6020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001206122de565b6001600160a01b0316816001600160a01b03161461073a576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f84015283516023818503018152604390930190935281519101206107939061236a565b6107e4576040805162461bcd60e51b815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006108246040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b905060006108666040518060400160405280600b81526020017f726f636b65745661756c7400000000000000000000000000000000000000000081525061213c565b905060006108e4836001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a657600080fd5b505afa1580156108ba573d6000803e3d6000fd5b505050506040513d60208110156108d057600080fd5b50516105d0670de0b6b3a76400008a612217565b905060006108f18961167d565b9050808211156108ff578091505b8115610a0457826001600160a01b031663ee91035e6109526040518060400160405280600e81526020017f726f636b6574546f6b656e52504c00000000000000000000000000000000000081525061213c565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660248301526044820186905260606004830152601460648301527f726f636b657441756374696f6e4d616e6167657200000000000000000000000060848301525160a480830192600092919082900301818387803b1580156109eb57600080fd5b505af11580156109ff573d6000803e3d6000fd5b505050505b610a0d826123c4565b610a1789836123f1565b610a2b8982610a268186612459565b6124b6565b60408051838152602081018a9052428183015290516001600160a01b038b16917f38a2777b6a84fdb3fc375fe8ade69fdad1afdcdd93c79e7ae2319b806a626c4d919081900360600190a2505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525030610b338260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614610b98576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120610bf19061236a565b610c42576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b610c4c3385612905565b50505050565b600080610c936040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b9050806001600160a01b0316635cb8299e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cce57600080fd5b505afa158015610ce2573d6000803e3d6000fd5b505050506040513d6020811015610cf857600080fd5b505191505090565b600080610d416040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b90506000610d666040518060600160405280602181526020016130266021913961213c565b90506000610da86040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b90506000610dea6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506105d6826001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2857600080fd5b505afa158015610e3c573d6000803e3d6000fd5b505050506040513d6020811015610e5257600080fd5b5051604080517f1844ec010000000000000000000000000000000000000000000000000000000081526001600160a01b038a8116600483015291516105d092891691631844ec01916024808301926020929190829003018186803b158015610eb957600080fd5b505afa158015610ecd573d6000803e3d6000fd5b505050506040513d6020811015610ee357600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b03881691631e72ba8691600480820192602092909190829003018186803b15801561051357600080fd5b60005460ff1681565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525030610ffe8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614611063576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206110bc9061236a565b61110d576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b600061114d6040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e67735265776172647381525061213c565b9050600061118f6040518060400160405280600b81526020017f726f636b65745661756c7400000000000000000000000000000000000000000081525061213c565b9050816001600160a01b03166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b1580156111ca57600080fd5b505afa1580156111de573d6000803e3d6000fd5b505050506040513d60208110156111f457600080fd5b505161120961120233611718565b4290612459565b10156112465760405162461bcd60e51b815260040180806020018281038252602d815260200180612f64602d913960400191505060405180910390fd5b60006112513361167d565b9050868110156112925760405162461bcd60e51b81526004018080602001828103825260338152602001806130686033913960400191505060405180910390fd5b61129b33610d00565b6112a58289612459565b10156112e25760405162461bcd60e51b8152600401808060200182810382526048815260200180612fde6048913960600191505060405180910390fd5b6112eb876123c4565b6112f533886123f1565b6113043382610a26818b612459565b600054604080517f5b49ff6200000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03808616936301e336679361010090910490911691635b49ff6291602480820192602092909190829003018186803b15801561137857600080fd5b505afa15801561138c573d6000803e3d6000fd5b505050506040513d60208110156113a257600080fd5b505160408051808201909152600e81527f726f636b6574546f6b656e52504c00000000000000000000000000000000000060208201526113e19061213c565b8a6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b5050604080518a815242602082015281513394507f9947063f70b076145616018b82ed1dd5585e15b7ae0a0b17a8b06bec4c4c31e293509081900390910190a250505050505050565b6000806114b96040518060600160405280602181526020016130266021913961213c565b905060006114fb6040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b9050600061153d6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b9050611674611603826001600160a01b0316636fdbe57b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561157e57600080fd5b505afa158015611592573d6000803e3d6000fd5b505050506040513d60208110156115a857600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b0388169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b6105d0846001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561163f57600080fd5b505afa158015611653573d6000803e3d6000fd5b505050506040513d602081101561166957600080fd5b50516105ca8961167d565b95945050505050565b60006116e28260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e7400000000000000000000815250601601826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c5d565b92915050565b60006117137fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a306612c5d565b905090565b60006116e28260405160200180807f72706c2e7374616b65642e6e6f64652e74696d65000000000000000000000000815250601401826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c5d565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152503061182f8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614611894576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b836118f88160405160200180807f6e6f64652e657869737473000000000000000000000000000000000000000000815250600b01826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012061236a565b611949576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6040518060400160405280601e81526020017f726f636b65744d65726b6c654469737472696275746f724d61696e6e65740000815250336119fb8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b6001600160a01b0316816001600160a01b031614611a60576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b611a6a8787612905565b50505050505050565b600080611ab46040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b90506000611ad96040518060600160405280602181526020016130266021913961213c565b90506000611b1b6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506000611be0826001600160a01b0316631e72ba866040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5b57600080fd5b505afa158015611b6f573d6000803e3d6000fd5b505050506040513d6020811015611b8557600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b0387169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b90506000611c226040518060400160405280601181526020017f6164647265737353657453746f7261676500000000000000000000000000000081525061213c565b905060007fb2fc74f0e3003fa42ac709f1c47d79ed4358e153eb2c56feab0a097a0f28770590506000826001600160a01b031663c9d6fee9836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b505190506000611cc98c8c612cb7565b905081811180611cd757508a155b15611cdf5750805b60008c5b82811015611e30576000866001600160a01b031663f3358a3a87846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611d3957600080fd5b505afa158015611d4d573d6000803e3d6000fd5b505050506040513d6020811015611d6357600080fd5b505190506000611d728261167d565b90506000611dfd8f6105d08f6001600160a01b03166357b4ef6b876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611dca57600080fd5b505afa158015611dde573d6000803e3d6000fd5b505050506040513d6020811015611df457600080fd5b50518d90612217565b905080821015611e1857611e118583612cb7565b9450611e25565b611e228582612cb7565b94505b505050600101611ce3565b509c9b505050505050505050505050565b600080611e826040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b90506000611ea76040518060600160405280602181526020016130266021913961213c565b90506000611ee96040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b90506000611f2b6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b90506000611f388761167d565b90506000612118846001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7857600080fd5b505afa158015611f8c573d6000803e3d6000fd5b505050506040513d6020811015611fa257600080fd5b5051604080517f57b4ef6b0000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015291516105d0928b16916357b4ef6b916024808301926020929190829003018186803b15801561200957600080fd5b505afa15801561201d573d6000803e3d6000fd5b505050506040513d602081101561203357600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b038a1691631e72ba8691600480820192602092909190829003018186803b15801561209357600080fd5b505afa1580156120a7573d6000803e3d6000fd5b505050506040513d60208110156120bd57600080fd5b5051604080517f162adbfd00000000000000000000000000000000000000000000000000000000815290516001600160a01b038d169163162adbfd916004808301926020929190829003018186803b15801561059857600080fd5b90508082101561212f575094506105dd9350505050565b95506105dd945050505050565b6000806121ba8360405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083836020831061069557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610658565b90506001600160a01b0381166116e2576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b600082612226575060006116e2565b8282028284828161223357fe5b04146122705760405162461bcd60e51b81526004018080602001828103825260218152602001806130476021913960400191505060405180910390fd5b9392505050565b60008082116122cd576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816122d657fe5b049392505050565b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561233857600080fd5b505afa15801561234c573d6000803e3d6000fd5b505050506040513d602081101561236257600080fd5b505192915050565b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561233857600080fd5b6123ee7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a30682612d11565b50565b6124558260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e7400000000000000000000815250601601826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012082612d11565b5050565b6000828211156124b0576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124f66040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061213c565b905060006125386040518060400160405280601381526020017f726f636b65744e6574776f726b5072696365730000000000000000000000000081525061213c565b9050600061255d6040518060600160405280602181526020016130266021913961213c565b9050600061259f6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f646500000081525061213c565b9050826001600160a01b03166337ab50046040518163ffffffff1660e01b815260040160206040518083038186803b1580156125da57600080fd5b505afa1580156125ee573d6000803e3d6000fd5b505050506040513d602081101561260457600080fd5b5051612657576040805162461bcd60e51b815260206004820152601b60248201527f4e6574776f726b206973206e6f7420696e20636f6e73656e7375730000000000604482015290519081900360640190fd5b60006127b0846001600160a01b031663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561269557600080fd5b505afa1580156126a9573d6000803e3d6000fd5b505050506040513d60208110156126bf57600080fd5b5051604080517f57b4ef6b0000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015291516105d0928a16916357b4ef6b916024808301926020929190829003018186803b15801561272657600080fd5b505afa15801561273a573d6000803e3d6000fd5b505050506040513d602081101561275057600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516105ca916001600160a01b03891691631e72ba8691600480820192602092909190829003018186803b15801561051357600080fd5b90508087101580156127c25750808610155b156127d1575050505050612900565b8587111561286a5760006127e58888612459565b905060006127f38389612459565b9050808210156128005750805b856001600160a01b031663052e5640826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561284657600080fd5b505af115801561285a573d6000803e3d6000fd5b5050505050505050505050612900565b868611156128fa57600061287e8789612459565b9050600061288c838a612459565b9050818111156128995750805b856001600160a01b031663b58d89d3826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156128df57600080fd5b505af11580156128f3573d6000803e3d6000fd5b5050505050505b50505050505b505050565b60006129456040518060400160405280600e81526020017f726f636b6574546f6b656e52504c00000000000000000000000000000000000081525061213c565b905060006129876040518060400160405280600b81526020017f726f636b65745661756c7400000000000000000000000000000000000000000081525061213c565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690529051919250839183916001600160a01b038416916323b872dd916064808201926020929091908290030181600087803b1580156129fd57600080fd5b505af1158015612a11573d6000803e3d6000fd5b505050506040513d6020811015612a2757600080fd5b5051612a645760405162461bcd60e51b815260040180806020018281038252602a815260200180612f91602a913960400191505060405180910390fd5b816001600160a01b031663095ea7b384876040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612abb57600080fd5b505af1158015612acf573d6000803e3d6000fd5b505050506040513d6020811015612ae557600080fd5b5051612b225760405162461bcd60e51b8152600401808060200182810382526023815260200180612fbb6023913960400191505060405180910390fd5b604080517ff44429580000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660248301526044820188905260606004830152601160648301527f726f636b65744e6f64655374616b696e67000000000000000000000000000000608483015291519183169163f44429589160a48082019260009290919082900301818387803b158015612bc157600080fd5b505af1158015612bd5573d6000803e3d6000fd5b505050506000612be48761167d565b9050612bef86612d99565b612bf98787612dc3565b612c088782610a26818a612cb7565b612c128742612e27565b6040805187815242602082015281516001600160a01b038a16927f4e3bcb61bb8e63cb9ed2c46d47eeb6ae847c629e909fbb32b9d17874affb4a89928290030190a250505050505050565b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561233857600080fd5b600082820183811015612270576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008054604080517febb9d8c9000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263ebb9d8c99260448084019382900301818387803b158015612d7d57600080fd5b505af1158015612d91573d6000803e3d6000fd5b505050505050565b6123ee7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a30682612e8b565b6124558260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e7400000000000000000000815250601601826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012082612e8b565b6124558260405160200180807f72706c2e7374616b65642e6e6f64652e74696d65000000000000000000000000815250601401826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012082612ef7565b60008054604080517fadb353dc000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263adb353dc9260448084019382900301818387803b158015612d7d57600080fd5b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b158015612d7d57600080fdfe546865207769746864726177616c20636f6f6c646f776e20706572696f6420686173206e6f7420706173736564436f756c64206e6f74207472616e736665722052504c20746f207374616b696e6720636f6e7472616374436f756c64206e6f7420617070726f7665207661756c742052504c206465706f7369744e6f64652773207374616b65642052504c2062616c616e6365206166746572207769746864726177616c206973206c657373207468616e2072657175697265642062616c616e6365726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775769746864726177616c20616d6f756e742065786365656473206e6f64652773207374616b65642052504c2062616c616e6365a2646970667358221220d5fd2ea364577fe2e2cb2bee9fce2ef535eaabe3908d5ddf56465ac6422d47af64736f6c63430007060033

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.