ETH Price: $3,157.45 (+1.47%)

Contract

0x3019227b2b8493e45Bf5d25302139c9a2713BF15
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake RPL176637682023-07-10 14:10:59497 days ago1688998259IN
Rocket Pool: Staking
0 ETH0.0009672632.61510758
Withdraw RPL157260372022-10-11 16:23:23769 days ago1665505403IN
Rocket Pool: Staking
0 ETH0.0008442628.5109101
Withdraw RPL157245742022-10-11 11:28:59769 days ago1665487739IN
Rocket Pool: Staking
0 ETH0.0007018323.74903223
Withdraw RPL154801382022-09-05 21:25:39805 days ago1662413139IN
Rocket Pool: Staking
0 ETH0.0003028810.22437506
Withdraw RPL154801122022-09-05 21:20:03805 days ago1662412803IN
Rocket Pool: Staking
0 ETH0.0003714412.5386522
Withdraw RPL154798842022-09-05 20:22:06805 days ago1662409326IN
Rocket Pool: Staking
0 ETH0.000597120.22160679
Withdraw RPL154303872022-08-28 22:13:41813 days ago1661724821IN
Rocket Pool: Staking
0 ETH0.0024170811.64401926
Stake RPL154300722022-08-28 21:06:09813 days ago1661720769IN
Rocket Pool: Staking
0 ETH0.001418747.28378458
Stake RPL154299112022-08-28 20:28:15813 days ago1661718495IN
Rocket Pool: Staking
0 ETH0.001363557
Stake RPL154298322022-08-28 20:12:04813 days ago1661717524IN
Rocket Pool: Staking
0 ETH0.0019480510
Stake RPL154298142022-08-28 20:08:29813 days ago1661717309IN
Rocket Pool: Staking
0 ETH0.0022913311.7629333
Stake RPL154297522022-08-28 19:51:56813 days ago1661716316IN
Rocket Pool: Staking
0 ETH0.0055414625.56719863
Stake RPL154296672022-08-28 19:27:51813 days ago1661714871IN
Rocket Pool: Staking
0 ETH0.0028422214.59010388
Stake RPL154294652022-08-28 18:43:23813 days ago1661712203IN
Rocket Pool: Staking
0 ETH0.0021710710.87751505
Stake RPL154289582022-08-28 16:49:45813 days ago1661705385IN
Rocket Pool: Staking
0 ETH0.0026488412.49734598
Stake RPL154289242022-08-28 16:41:31813 days ago1661704891IN
Rocket Pool: Staking
0 ETH0.001363637
Stake RPL154284882022-08-28 15:02:33813 days ago1661698953IN
Rocket Pool: Staking
0 ETH0.001138686.40602076
Stake RPL154283152022-08-28 14:24:55813 days ago1661696695IN
Rocket Pool: Staking
0 ETH0.0028648916.11729417
Stake RPL154278392022-08-28 12:35:29813 days ago1661690129IN
Rocket Pool: Staking
0 ETH0.000993665.10111773
Stake RPL154276132022-08-28 11:47:21813 days ago1661687241IN
Rocket Pool: Staking
0 ETH0.000973965
Stake RPL154263642022-08-28 6:58:39813 days ago1661669919IN
Rocket Pool: Staking
0 ETH0.000974025
Stake RPL154256822022-08-28 4:15:38813 days ago1661660138IN
Rocket Pool: Staking
0 ETH0.001982189.35202002
Stake RPL154245902022-08-27 23:59:39814 days ago1661644779IN
Rocket Pool: Staking
0 ETH0.000974025
Stake RPL154243622022-08-27 23:09:18814 days ago1661641758IN
Rocket Pool: Staking
0 ETH0.000779224
Stake RPL154236752022-08-27 20:24:18814 days ago1661631858IN
Rocket Pool: Staking
0 ETH0.000584413
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
176637682023-07-10 14:10:59497 days ago1688998259
0x3019227b...a2713BF15
0 ETH
157260372022-10-11 16:23:23769 days ago1665505403
0x3019227b...a2713BF15
0 ETH
157245742022-10-11 11:28:59769 days ago1665487739
0x3019227b...a2713BF15
0 ETH
154801382022-09-05 21:25:39805 days ago1662413139
0x3019227b...a2713BF15
0 ETH
154801122022-09-05 21:20:03805 days ago1662412803
0x3019227b...a2713BF15
0 ETH
154798842022-09-05 20:22:06805 days ago1662409326
0x3019227b...a2713BF15
0 ETH
154305982022-08-28 23:07:51813 days ago1661728071
0x3019227b...a2713BF15
0 ETH
154305982022-08-28 23:07:51813 days ago1661728071
0x3019227b...a2713BF15
0 ETH
154305772022-08-28 23:00:49813 days ago1661727649
0x3019227b...a2713BF15
0 ETH
154305772022-08-28 23:00:49813 days ago1661727649
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
154303872022-08-28 22:13:41813 days ago1661724821
0x3019227b...a2713BF15
0 ETH
View All Internal Transactions
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 19 : RocketNodeStaking.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
  *  be community-owned, decentralised, and trustless.
  *
  *  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 = 1;
    }

    // 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) {
        // 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(msg.sender);
        // Update RPL stake amounts & node RPL staked block
        increaseTotalRPLStake(_amount);
        increaseNodeRPLStake(msg.sender, _amount);
        updateTotalEffectiveRPLStake(msg.sender, rplStake, rplStake.add(_amount));
        setNodeRPLStakedTime(msg.sender, block.timestamp);
        // Emit RPL staked event
        emit RPLStaked(msg.sender, _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 19 : 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 19 : 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 19 : 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 19 : 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 19 : 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 19 : RocketBase.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
  *  be community-owned, decentralised, and trustless.
  *
  *  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 19 : RocketStorageInterface.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
  *  be community-owned, decentralised, and trustless.
  *
  *  For more information about Rocket Pool, visit https://rocketpool.net
  *
  *  Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty
  *
  */

pragma solidity 0.7.6;

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

interface RocketStorageInterface {

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

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

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

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

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

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

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

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

pragma solidity 0.7.6;

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

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

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

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

pragma solidity 0.7.6;

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

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

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

pragma solidity 0.7.6;

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

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

pragma solidity 0.7.6;

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

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

interface RocketMinipoolInterface {
    function initialise(address _nodeAddress, MinipoolDeposit _depositType) external;
    function getStatus() external view returns (MinipoolStatus);
    function getFinalised() external view returns (bool);
    function getStatusBlock() external view returns (uint256);
    function getStatusTime() external view returns (uint256);
    function getScrubVoted(address _member) external view returns (bool);
    function getDepositType() external view returns (MinipoolDeposit);
    function getNodeAddress() external view returns (address);
    function getNodeFee() external view returns (uint256);
    function getNodeDepositBalance() external view returns (uint256);
    function getNodeRefundBalance() external view returns (uint256);
    function getNodeDepositAssigned() external view returns (bool);
    function getUserDepositBalance() external view returns (uint256);
    function getUserDepositAssigned() external view returns (bool);
    function getUserDepositAssignedTime() external view returns (uint256);
    function getTotalScrubVotes() external view returns (uint256);
    function calculateNodeShare(uint256 _balance) external view returns (uint256);
    function calculateUserShare(uint256 _balance) external view returns (uint256);
    function nodeDeposit(bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function userDeposit() external payable;
    function distributeBalance() external;
    function distributeBalanceAndFinalise() external;
    function refund() external;
    function slash() external;
    function finalise() external;
    function canStake() external view returns (bool);
    function stake(bytes calldata _validatorSignature, bytes32 _depositDataRoot) external;
    function setWithdrawable() external;
    function dissolve() external;
    function close() external;
    function voteScrub() external;
}

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

pragma solidity 0.7.6;

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

import "../../types/MinipoolDeposit.sol";
import "./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 getMinipoolBytecode() external pure returns (bytes memory);
}

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

pragma solidity 0.7.6;

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

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

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

pragma solidity 0.7.6;

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

interface RocketNodeStakingInterface {
    function getTotalRPLStake() external view returns (uint256);
    function getNodeRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeRPLStakedTime(address _nodeAddress) external view returns (uint256);
    function getTotalEffectiveRPLStake() external view returns (uint256);
    function calculateTotalEffectiveRPLStake(uint256 offset, uint256 limit, uint256 rplPrice) external view returns (uint256);
    function getNodeEffectiveRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMinimumRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMaximumRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMinipoolLimit(address _nodeAddress) external view returns (uint256);
    function stakeRPL(uint256 _amount) external;
    function withdrawRPL(uint256 _amount) external;
    function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) external;
}

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

pragma solidity 0.7.6;

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

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

File 18 of 19 : MinipoolDeposit.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
  *  be community-owned, decentralised, and trustless.
  *
  *  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 19 : MinipoolStatus.sol
/**
  *       .
  *      / \
  *     |.'.|
  *     |'.'|
  *   ,'|   |`.
  *  |,-'-|-'-.|
  *   __|_| |         _        _      _____           _
  *  | ___ \|        | |      | |    | ___ \         | |
  *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
  *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
  *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
  *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
  * +---------------------------------------------------+
  * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
  * +---------------------------------------------------+
  *
  *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
  *  be community-owned, decentralised, and trustless.
  *
  *  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":[],"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"}]

608060405260008054610100600160a81b031916905534801561002157600080fd5b5060405161332f38038061332f8339818101604052602081101561004457600080fd5b50516000805460ff196001600160a01b0390931661010002610100600160a81b0319909116179190911660011790556132ad806100826000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80636b088d5c1161008c5780639a206c8e116100665780639a206c8e1461025d578063c0d05dd814610265578063e8e34cc214610298578063f0d19b89146102c1576100df565b80636b088d5c146101da57806390f7ff4c146101f75780639961cee41461022a576100df565b80634b24426d116100bd5780634b24426d146101815780634e58ff6e1461018957806354fd4d50146101bc576100df565b806303fa87b4146100e4578063245395a6146101295780633e200d4b14610164575b600080fd5b610117600480360360208110156100fa57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102f4565b60408051918252519081900360200190f35b6101626004803603604081101561013f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561063a565b005b6101626004803603602081101561017a57600080fd5b5035610b5b565b610117611123565b6101176004803603602081101561019f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111de565b6101c4611448565b6040805160ff9092168252519081900360200190f35b610162600480360360208110156101f057600080fd5b5035611451565b6101176004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a6a565b6101176004803603602081101561024057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611c79565b610117611cf1565b6101176004803603602081101561027b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d21565b610117600480360360608110156102ae57600080fd5b5080359060208101359060400135611d93565b610117600480360360208110156102d757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166121af565b6000806103356040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b9050600061035a604051806060016040528060218152602001613203602191396124de565b9050600061039c6040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006103de6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b905061062e8273ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d602081101561045357600080fd5b5051604080517f1844ec0100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152915161062892891691631844ec01916024808301926020929190829003018186803b1580156104c757600080fd5b505afa1580156104db573d6000803e3d6000fd5b505050506040513d60208110156104f157600080fd5b5051604080517f6fdbe57b00000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff881691636fdbe57b91600480820192602092909190829003018186803b15801561055e57600080fd5b505afa158015610572573d6000803e3d6000fd5b505050506040513d602081101561058857600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8b169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b505afa158015610604573d6000803e3d6000fd5b505050506040513d602081101561061a57600080fd5b5051906125e0565b906125e0565b9061265a565b9450505050505b919050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152503061072d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001206126db565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107c657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f840152835160238185030181526043909301909352815191012061081f90612781565b61088a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006108ca6040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b9050600061090c6040518060400160405280600b81526020017f726f636b65745661756c740000000000000000000000000000000000000000008152506124de565b905060006109978373ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561095957600080fd5b505afa15801561096d573d6000803e3d6000fd5b505050506040513d602081101561098357600080fd5b5051610628670de0b6b3a76400008a6125e0565b905060006109a489611c79565b9050808211156109b2578091505b8115610ad1578273ffffffffffffffffffffffffffffffffffffffff1663ee91035e610a126040518060400160405280600e81526020017f726f636b6574546f6b656e52504c0000000000000000000000000000000000008152506124de565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660248301526044820186905260606004830152601460648301527f726f636b657441756374696f6e4d616e6167657200000000000000000000000060848301525160a480830192600092919082900301818387803b158015610ab857600080fd5b505af1158015610acc573d6000803e3d6000fd5b505050505b610ada826127f5565b610ae48983612822565b610af88982610af38186612897565b61290e565b60408051838152602081018a90524281830152905173ffffffffffffffffffffffffffffffffffffffff8b16917f38a2777b6a84fdb3fc375fe8ade69fdad1afdcdd93c79e7ae2319b806a626c4d919081900360600190a2505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525030610c0d8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ca657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120610cff90612781565b610d6a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610daa6040518060400160405280600e81526020017f726f636b6574546f6b656e52504c0000000000000000000000000000000000008152506124de565b90506000610dec6040518060400160405280600b81526020017f726f636b65745661756c740000000000000000000000000000000000000000008152506124de565b604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810189905290519192508391839173ffffffffffffffffffffffffffffffffffffffff8416916323b872dd916064808201926020929091908290030181600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6020811015610e9957600080fd5b5051610ef0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061316e602a913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3848a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b505050506040513d6020811015610f8b57600080fd5b5051610fe2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806131986023913960400191505060405180910390fd5b604080517ff444295800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166024830152604482018b905260606004830152601160648301527f726f636b65744e6f64655374616b696e67000000000000000000000000000000608483015291519183169163f44429589160a48082019260009290919082900301818387803b15801561108e57600080fd5b505af11580156110a2573d6000803e3d6000fd5b5050505060006110b133611c79565b90506110bc89612dc5565b6110c6338a612def565b6110d53382610af3818d612e60565b6110df3342612ed4565b604080518a8152426020820152815133927f4e3bcb61bb8e63cb9ed2c46d47eeb6ae847c629e909fbb32b9d17874affb4a89928290030190a2505050505050505050565b6000806111646040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b90508073ffffffffffffffffffffffffffffffffffffffff16635cb8299e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111ac57600080fd5b505afa1580156111c0573d6000803e3d6000fd5b505050506040513d60208110156111d657600080fd5b505191505090565b60008061121f6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b90506000611244604051806060016040528060218152602001613203602191396124de565b905060006112866040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006112c86040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b905061062e8273ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561131357600080fd5b505afa158015611327573d6000803e3d6000fd5b505050506040513d602081101561133d57600080fd5b5051604080517f1844ec0100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152915161062892891691631844ec01916024808301926020929190829003018186803b1580156113b157600080fd5b505afa1580156113c5573d6000803e3d6000fd5b505050506040513d60208110156113db57600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff881691631e72ba8691600480820192602092909190829003018186803b15801561055e57600080fd5b60005460ff1681565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250306115038260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461159c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206115f590612781565b61166057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b60006116a06040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e6773526577617264738152506124de565b905060006116e26040518060400160405280600b81526020017f726f636b65745661756c740000000000000000000000000000000000000000008152506124de565b90508173ffffffffffffffffffffffffffffffffffffffff166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b15801561172a57600080fd5b505afa15801561173e573d6000803e3d6000fd5b505050506040513d602081101561175457600080fd5b505161176961176233611d21565b4290612897565b10156117c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180613141602d913960400191505060405180910390fd5b60006117cb33611c79565b905086811015611826576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806132456033913960400191505060405180910390fd5b61182f336111de565b6118398289612897565b1015611890576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260488152602001806131bb6048913960600191505060405180910390fd5b611899876127f5565b6118a33388612822565b6118b23382610af3818b612897565b600054604080517f5b49ff62000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff808616936301e336679361010090910490911691635b49ff6291602480820192602092909190829003018186803b15801561193357600080fd5b505afa158015611947573d6000803e3d6000fd5b505050506040513d602081101561195d57600080fd5b505160408051808201909152600e81527f726f636b6574546f6b656e52504c000000000000000000000000000000000000602082015261199c906124de565b8a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015611a0d57600080fd5b505af1158015611a21573d6000803e3d6000fd5b5050604080518a815242602082015281513394507f9947063f70b076145616018b82ed1dd5585e15b7ae0a0b17a8b06bec4c4c31e293509081900390910190a250505050505050565b600080611a8e604051806060016040528060218152602001613203602191396124de565b90506000611ad06040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b90506000611b126040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b9050611c70611bf28273ffffffffffffffffffffffffffffffffffffffff16636fdbe57b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6057600080fd5b505afa158015611b74573d6000803e3d6000fd5b505050506040513d6020811015611b8a57600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff88169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b6106288473ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3b57600080fd5b505afa158015611c4f573d6000803e3d6000fd5b505050506040513d6020811015611c6557600080fd5b505161062289611c79565b95945050505050565b6000611ceb8260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e74000000000000000000008152506016018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120612f45565b92915050565b6000611d1c7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a306612f45565b905090565b6000611ceb8260405160200180807f72706c2e7374616b65642e6e6f64652e74696d650000000000000000000000008152506014018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120612f45565b600080611dd46040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b90506000611df9604051806060016040528060218152602001613203602191396124de565b90506000611e3b6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b90506000611f1a8273ffffffffffffffffffffffffffffffffffffffff16631e72ba866040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8857600080fd5b505afa158015611e9c573d6000803e3d6000fd5b505050506040513d6020811015611eb257600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff87169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b90506000611f5c6040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506124de565b905060007fb2fc74f0e3003fa42ac709f1c47d79ed4358e153eb2c56feab0a097a0f287705905060008273ffffffffffffffffffffffffffffffffffffffff1663c9d6fee9836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611fd657600080fd5b505afa158015611fea573d6000803e3d6000fd5b505050506040513d602081101561200057600080fd5b5051905060006120108c8c612e60565b90508181118061201e57508a155b156120265750805b60008c5b8281101561219e5760008673ffffffffffffffffffffffffffffffffffffffff1663f3358a3a87846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561208d57600080fd5b505afa1580156120a1573d6000803e3d6000fd5b505050506040513d60208110156120b757600080fd5b5051905060006120c682611c79565b9050600061216b8f6106288f73ffffffffffffffffffffffffffffffffffffffff166357b4ef6b876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561213857600080fd5b505afa15801561214c573d6000803e3d6000fd5b505050506040513d602081101561216257600080fd5b50518d906125e0565b9050808210156121865761217f8583612e60565b9450612193565b6121908582612e60565b94505b50505060010161202a565b509c9b505050505050505050505050565b6000806121f06040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b90506000612215604051806060016040528060218152602001613203602191396124de565b905060006122576040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006122996040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b905060006122a687611c79565b905060006124ba8473ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156122f357600080fd5b505afa158015612307573d6000803e3d6000fd5b505050506040513d602081101561231d57600080fd5b5051604080517f57b4ef6b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811660048301529151610628928b16916357b4ef6b916024808301926020929190829003018186803b15801561239157600080fd5b505afa1580156123a5573d6000803e3d6000fd5b505050506040513d60208110156123bb57600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff8a1691631e72ba8691600480820192602092909190829003018186803b15801561242857600080fd5b505afa15801561243c573d6000803e3d6000fd5b505050506040513d602081101561245257600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8d169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b9050808210156124d1575094506106359350505050565b9550610635945050505050565b60008061255c8360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b905073ffffffffffffffffffffffffffffffffffffffff8116611ceb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b6000826125ef57506000611ceb565b828202828482816125fc57fe5b0414612653576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806132246021913960400191505060405180910390fd5b9392505050565b60008082116126ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816126d357fe5b049392505050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561274f57600080fd5b505afa158015612763573d6000803e3d6000fd5b505050506040513d602081101561277957600080fd5b505192915050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561274f57600080fd5b61281f7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a30682612fb9565b50565b6128938260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e74000000000000000000008152506016018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012082612fb9565b5050565b60008282111561290857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061294e6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b905060006129906040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006129b5604051806060016040528060218152602001613203602191396124de565b905060006129f76040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b90508273ffffffffffffffffffffffffffffffffffffffff166337ab50046040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3f57600080fd5b505afa158015612a53573d6000803e3d6000fd5b505050506040513d6020811015612a6957600080fd5b5051612ad657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e6574776f726b206973206e6f7420696e20636f6e73656e7375730000000000604482015290519081900360640190fd5b6000612c568473ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2157600080fd5b505afa158015612b35573d6000803e3d6000fd5b505050506040513d6020811015612b4b57600080fd5b5051604080517f57b4ef6b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811660048301529151610628928a16916357b4ef6b916024808301926020929190829003018186803b158015612bbf57600080fd5b505afa158015612bd3573d6000803e3d6000fd5b505050506040513d6020811015612be957600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff891691631e72ba8691600480820192602092909190829003018186803b15801561055e57600080fd5b9050808710158015612c685750808610155b15612c77575050505050612dc0565b85871115612d1d576000612c8b8888612897565b90506000612c998389612897565b905080821015612ca65750805b8573ffffffffffffffffffffffffffffffffffffffff1663052e5640826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612cf957600080fd5b505af1158015612d0d573d6000803e3d6000fd5b5050505050505050505050612dc0565b86861115612dba576000612d318789612897565b90506000612d3f838a612897565b905081811115612d4c5750805b8573ffffffffffffffffffffffffffffffffffffffff1663b58d89d3826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612d9f57600080fd5b505af1158015612db3573d6000803e3d6000fd5b5050505050505b50505050505b505050565b61281f7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a3068261304e565b6128938260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e74000000000000000000008152506016018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401915050604051602081830303815290604052805190602001208261304e565b60008282018381101561265357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6128938260405160200180807f72706c2e7374616b65642e6e6f64652e74696d650000000000000000000000008152506014018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120826130c7565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561274f57600080fd5b60008054604080517febb9d8c90000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263ebb9d8c99260448084019382900301818387803b15801561303257600080fd5b505af1158015613046573d6000803e3d6000fd5b505050505050565b60008054604080517fadb353dc0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263adb353dc9260448084019382900301818387803b15801561303257600080fd5b60008054604080517fe2a4853a0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263e2a4853a9260448084019382900301818387803b15801561303257600080fdfe546865207769746864726177616c20636f6f6c646f776e20706572696f6420686173206e6f7420706173736564436f756c64206e6f74207472616e736665722052504c20746f207374616b696e6720636f6e7472616374436f756c64206e6f7420617070726f7665207661756c742052504c206465706f7369744e6f64652773207374616b65642052504c2062616c616e6365206166746572207769746864726177616c206973206c657373207468616e2072657175697265642062616c616e6365726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775769746864726177616c20616d6f756e742065786365656473206e6f64652773207374616b65642052504c2062616c616e6365a2646970667358221220a1f66b5b3eb6b9b8986841bfa0a3bfb7f30d880c03976d8a6a0d100df2ae816464736f6c634300070600330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80636b088d5c1161008c5780639a206c8e116100665780639a206c8e1461025d578063c0d05dd814610265578063e8e34cc214610298578063f0d19b89146102c1576100df565b80636b088d5c146101da57806390f7ff4c146101f75780639961cee41461022a576100df565b80634b24426d116100bd5780634b24426d146101815780634e58ff6e1461018957806354fd4d50146101bc576100df565b806303fa87b4146100e4578063245395a6146101295780633e200d4b14610164575b600080fd5b610117600480360360208110156100fa57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102f4565b60408051918252519081900360200190f35b6101626004803603604081101561013f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561063a565b005b6101626004803603602081101561017a57600080fd5b5035610b5b565b610117611123565b6101176004803603602081101561019f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111de565b6101c4611448565b6040805160ff9092168252519081900360200190f35b610162600480360360208110156101f057600080fd5b5035611451565b6101176004803603602081101561020d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a6a565b6101176004803603602081101561024057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611c79565b610117611cf1565b6101176004803603602081101561027b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d21565b610117600480360360608110156102ae57600080fd5b5080359060208101359060400135611d93565b610117600480360360208110156102d757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166121af565b6000806103356040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b9050600061035a604051806060016040528060218152602001613203602191396124de565b9050600061039c6040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006103de6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b905061062e8273ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d602081101561045357600080fd5b5051604080517f1844ec0100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152915161062892891691631844ec01916024808301926020929190829003018186803b1580156104c757600080fd5b505afa1580156104db573d6000803e3d6000fd5b505050506040513d60208110156104f157600080fd5b5051604080517f6fdbe57b00000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff881691636fdbe57b91600480820192602092909190829003018186803b15801561055e57600080fd5b505afa158015610572573d6000803e3d6000fd5b505050506040513d602081101561058857600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8b169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b505afa158015610604573d6000803e3d6000fd5b505050506040513d602081101561061a57600080fd5b5051906125e0565b906125e0565b9061265a565b9450505050505b919050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e670000000000000000000000000000008152503061072d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001206126db565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107c657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6d696e69706f6f6c2e657869737473000000000000000000000000000000000060208083019190915233606081901b602f840152835160238185030181526043909301909352815191012061081f90612781565b61088a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c6964206d696e69706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b60006108ca6040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b9050600061090c6040518060400160405280600b81526020017f726f636b65745661756c740000000000000000000000000000000000000000008152506124de565b905060006109978373ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561095957600080fd5b505afa15801561096d573d6000803e3d6000fd5b505050506040513d602081101561098357600080fd5b5051610628670de0b6b3a76400008a6125e0565b905060006109a489611c79565b9050808211156109b2578091505b8115610ad1578273ffffffffffffffffffffffffffffffffffffffff1663ee91035e610a126040518060400160405280600e81526020017f726f636b6574546f6b656e52504c0000000000000000000000000000000000008152506124de565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660248301526044820186905260606004830152601460648301527f726f636b657441756374696f6e4d616e6167657200000000000000000000000060848301525160a480830192600092919082900301818387803b158015610ab857600080fd5b505af1158015610acc573d6000803e3d6000fd5b505050505b610ada826127f5565b610ae48983612822565b610af88982610af38186612897565b61290e565b60408051838152602081018a90524281830152905173ffffffffffffffffffffffffffffffffffffffff8b16917f38a2777b6a84fdb3fc375fe8ade69fdad1afdcdd93c79e7ae2319b806a626c4d919081900360600190a2505050505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525030610c0d8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ca657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120610cff90612781565b610d6a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610daa6040518060400160405280600e81526020017f726f636b6574546f6b656e52504c0000000000000000000000000000000000008152506124de565b90506000610dec6040518060400160405280600b81526020017f726f636b65745661756c740000000000000000000000000000000000000000008152506124de565b604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810189905290519192508391839173ffffffffffffffffffffffffffffffffffffffff8416916323b872dd916064808201926020929091908290030181600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6020811015610e9957600080fd5b5051610ef0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061316e602a913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3848a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f6157600080fd5b505af1158015610f75573d6000803e3d6000fd5b505050506040513d6020811015610f8b57600080fd5b5051610fe2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806131986023913960400191505060405180910390fd5b604080517ff444295800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166024830152604482018b905260606004830152601160648301527f726f636b65744e6f64655374616b696e67000000000000000000000000000000608483015291519183169163f44429589160a48082019260009290919082900301818387803b15801561108e57600080fd5b505af11580156110a2573d6000803e3d6000fd5b5050505060006110b133611c79565b90506110bc89612dc5565b6110c6338a612def565b6110d53382610af3818d612e60565b6110df3342612ed4565b604080518a8152426020820152815133927f4e3bcb61bb8e63cb9ed2c46d47eeb6ae847c629e909fbb32b9d17874affb4a89928290030190a2505050505050505050565b6000806111646040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b90508073ffffffffffffffffffffffffffffffffffffffff16635cb8299e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111ac57600080fd5b505afa1580156111c0573d6000803e3d6000fd5b505050506040513d60208110156111d657600080fd5b505191505090565b60008061121f6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b90506000611244604051806060016040528060218152602001613203602191396124de565b905060006112866040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006112c86040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b905061062e8273ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b15801561131357600080fd5b505afa158015611327573d6000803e3d6000fd5b505050506040513d602081101561133d57600080fd5b5051604080517f1844ec0100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152915161062892891691631844ec01916024808301926020929190829003018186803b1580156113b157600080fd5b505afa1580156113c5573d6000803e3d6000fd5b505050506040513d60208110156113db57600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff881691631e72ba8691600480820192602092909190829003018186803b15801561055e57600080fd5b60005460ff1681565b6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250306115038260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461159c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206115f590612781565b61166057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b60006116a06040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e6773526577617264738152506124de565b905060006116e26040518060400160405280600b81526020017f726f636b65745661756c740000000000000000000000000000000000000000008152506124de565b90508173ffffffffffffffffffffffffffffffffffffffff166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b15801561172a57600080fd5b505afa15801561173e573d6000803e3d6000fd5b505050506040513d602081101561175457600080fd5b505161176961176233611d21565b4290612897565b10156117c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180613141602d913960400191505060405180910390fd5b60006117cb33611c79565b905086811015611826576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806132456033913960400191505060405180910390fd5b61182f336111de565b6118398289612897565b1015611890576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260488152602001806131bb6048913960600191505060405180910390fd5b611899876127f5565b6118a33388612822565b6118b23382610af3818b612897565b600054604080517f5b49ff62000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff808616936301e336679361010090910490911691635b49ff6291602480820192602092909190829003018186803b15801561193357600080fd5b505afa158015611947573d6000803e3d6000fd5b505050506040513d602081101561195d57600080fd5b505160408051808201909152600e81527f726f636b6574546f6b656e52504c000000000000000000000000000000000000602082015261199c906124de565b8a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015611a0d57600080fd5b505af1158015611a21573d6000803e3d6000fd5b5050604080518a815242602082015281513394507f9947063f70b076145616018b82ed1dd5585e15b7ae0a0b17a8b06bec4c4c31e293509081900390910190a250505050505050565b600080611a8e604051806060016040528060218152602001613203602191396124de565b90506000611ad06040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b90506000611b126040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b9050611c70611bf28273ffffffffffffffffffffffffffffffffffffffff16636fdbe57b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6057600080fd5b505afa158015611b74573d6000803e3d6000fd5b505050506040513d6020811015611b8a57600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff88169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b6106288473ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3b57600080fd5b505afa158015611c4f573d6000803e3d6000fd5b505050506040513d6020811015611c6557600080fd5b505161062289611c79565b95945050505050565b6000611ceb8260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e74000000000000000000008152506016018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120612f45565b92915050565b6000611d1c7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a306612f45565b905090565b6000611ceb8260405160200180807f72706c2e7374616b65642e6e6f64652e74696d650000000000000000000000008152506014018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120612f45565b600080611dd46040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b90506000611df9604051806060016040528060218152602001613203602191396124de565b90506000611e3b6040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b90506000611f1a8273ffffffffffffffffffffffffffffffffffffffff16631e72ba866040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8857600080fd5b505afa158015611e9c573d6000803e3d6000fd5b505050506040513d6020811015611eb257600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff87169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b90506000611f5c6040518060400160405280601181526020017f6164647265737353657453746f726167650000000000000000000000000000008152506124de565b905060007fb2fc74f0e3003fa42ac709f1c47d79ed4358e153eb2c56feab0a097a0f287705905060008273ffffffffffffffffffffffffffffffffffffffff1663c9d6fee9836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611fd657600080fd5b505afa158015611fea573d6000803e3d6000fd5b505050506040513d602081101561200057600080fd5b5051905060006120108c8c612e60565b90508181118061201e57508a155b156120265750805b60008c5b8281101561219e5760008673ffffffffffffffffffffffffffffffffffffffff1663f3358a3a87846040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561208d57600080fd5b505afa1580156120a1573d6000803e3d6000fd5b505050506040513d60208110156120b757600080fd5b5051905060006120c682611c79565b9050600061216b8f6106288f73ffffffffffffffffffffffffffffffffffffffff166357b4ef6b876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561213857600080fd5b505afa15801561214c573d6000803e3d6000fd5b505050506040513d602081101561216257600080fd5b50518d906125e0565b9050808210156121865761217f8583612e60565b9450612193565b6121908582612e60565b94505b50505060010161202a565b509c9b505050505050505050505050565b6000806121f06040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b90506000612215604051806060016040528060218152602001613203602191396124de565b905060006122576040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006122996040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b905060006122a687611c79565b905060006124ba8473ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b1580156122f357600080fd5b505afa158015612307573d6000803e3d6000fd5b505050506040513d602081101561231d57600080fd5b5051604080517f57b4ef6b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811660048301529151610628928b16916357b4ef6b916024808301926020929190829003018186803b15801561239157600080fd5b505afa1580156123a5573d6000803e3d6000fd5b505050506040513d60208110156123bb57600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff8a1691631e72ba8691600480820192602092909190829003018186803b15801561242857600080fd5b505afa15801561243c573d6000803e3d6000fd5b505050506040513d602081101561245257600080fd5b5051604080517f162adbfd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8d169163162adbfd916004808301926020929190829003018186803b1580156105f057600080fd5b9050808210156124d1575094506106359350505050565b9550610635945050505050565b60008061255c8360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106106ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016106b0565b905073ffffffffffffffffffffffffffffffffffffffff8116611ceb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b6000826125ef57506000611ceb565b828202828482816125fc57fe5b0414612653576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806132246021913960400191505060405180910390fd5b9392505050565b60008082116126ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816126d357fe5b049392505050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561274f57600080fd5b505afa158015612763573d6000803e3d6000fd5b505050506040513d602081101561277957600080fd5b505192915050565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561274f57600080fd5b61281f7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a30682612fb9565b50565b6128938260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e74000000000000000000008152506016018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012082612fb9565b5050565b60008282111561290857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061294e6040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e6167657200000000000000000000008152506124de565b905060006129906040518060400160405280601381526020017f726f636b65744e6574776f726b507269636573000000000000000000000000008152506124de565b905060006129b5604051806060016040528060218152602001613203602191396124de565b905060006129f76040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000008152506124de565b90508273ffffffffffffffffffffffffffffffffffffffff166337ab50046040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3f57600080fd5b505afa158015612a53573d6000803e3d6000fd5b505050506040513d6020811015612a6957600080fd5b5051612ad657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e6574776f726b206973206e6f7420696e20636f6e73656e7375730000000000604482015290519081900360640190fd5b6000612c568473ffffffffffffffffffffffffffffffffffffffff1663724d4a096040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2157600080fd5b505afa158015612b35573d6000803e3d6000fd5b505050506040513d6020811015612b4b57600080fd5b5051604080517f57b4ef6b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c811660048301529151610628928a16916357b4ef6b916024808301926020929190829003018186803b158015612bbf57600080fd5b505afa158015612bd3573d6000803e3d6000fd5b505050506040513d6020811015612be957600080fd5b5051604080517f1e72ba8600000000000000000000000000000000000000000000000000000000815290516106229173ffffffffffffffffffffffffffffffffffffffff891691631e72ba8691600480820192602092909190829003018186803b15801561055e57600080fd5b9050808710158015612c685750808610155b15612c77575050505050612dc0565b85871115612d1d576000612c8b8888612897565b90506000612c998389612897565b905080821015612ca65750805b8573ffffffffffffffffffffffffffffffffffffffff1663052e5640826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612cf957600080fd5b505af1158015612d0d573d6000803e3d6000fd5b5050505050505050505050612dc0565b86861115612dba576000612d318789612897565b90506000612d3f838a612897565b905081811115612d4c5750805b8573ffffffffffffffffffffffffffffffffffffffff1663b58d89d3826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612d9f57600080fd5b505af1158015612db3573d6000803e3d6000fd5b5050505050505b50505050505b505050565b61281f7fe9120b7223ae2a37e3e3d2dfb439c54ebbdeabe89bce6d355f59122854c4a3068261304e565b6128938260405160200180807f72706c2e7374616b65642e6e6f64652e616d6f756e74000000000000000000008152506016018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401915050604051602081830303815290604052805190602001208261304e565b60008282018381101561265357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6128938260405160200180807f72706c2e7374616b65642e6e6f64652e74696d650000000000000000000000008152506014018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120826130c7565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561274f57600080fd5b60008054604080517febb9d8c90000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263ebb9d8c99260448084019382900301818387803b15801561303257600080fd5b505af1158015613046573d6000803e3d6000fd5b505050505050565b60008054604080517fadb353dc0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263adb353dc9260448084019382900301818387803b15801561303257600080fd5b60008054604080517fe2a4853a0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052905161010090920473ffffffffffffffffffffffffffffffffffffffff169263e2a4853a9260448084019382900301818387803b15801561303257600080fdfe546865207769746864726177616c20636f6f6c646f776e20706572696f6420686173206e6f7420706173736564436f756c64206e6f74207472616e736665722052504c20746f207374616b696e6720636f6e7472616374436f756c64206e6f7420617070726f7665207661756c742052504c206465706f7369744e6f64652773207374616b65642052504c2062616c616e6365206166746572207769746864726177616c206973206c657373207468616e2072657175697265642062616c616e6365726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775769746864726177616c20616d6f756e742065786365656473206e6f64652773207374616b65642052504c2062616c616e6365a2646970667358221220a1f66b5b3eb6b9b8986841bfa0a3bfb7f30d880c03976d8a6a0d100df2ae816464736f6c63430007060033

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.