ETH Price: $3,298.84 (-3.31%)
Gas: 20 Gwei

Contract

0x67CdE7AF920682A29fcfea1A179ef0f30F48Df3e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Set Smoothing Po...158675612022-10-31 10:51:47611 days ago1667213507IN
0x67CdE7AF...30F48Df3e
0 ETH0.000322810.87252049
Set Smoothing Po...158638902022-10-30 22:33:47611 days ago1667169227IN
0x67CdE7AF...30F48Df3e
0 ETH0.000938588
Register Node158637532022-10-30 22:05:59611 days ago1667167559IN
0x67CdE7AF...30F48Df3e
0 ETH0.0042334712.48877905
Register Node158636292022-10-30 21:41:11611 days ago1667166071IN
0x67CdE7AF...30F48Df3e
0 ETH0.002373217
Initialise Fee D...158630792022-10-30 19:50:35611 days ago1667159435IN
0x67CdE7AF...30F48Df3e
0 ETH0.002398598.65233862
Set Smoothing Po...158626752022-10-30 18:29:23611 days ago1667154563IN
0x67CdE7AF...30F48Df3e
0 ETH0.00097158.28056217
Register Node158625882022-10-30 18:11:35611 days ago1667153495IN
0x67CdE7AF...30F48Df3e
0 ETH0.0037277411
Set Smoothing Po...158625222022-10-30 17:58:23611 days ago1667152703IN
0x67CdE7AF...30F48Df3e
0 ETH0.00105599
Set Smoothing Po...158616992022-10-30 15:12:59611 days ago1667142779IN
0x67CdE7AF...30F48Df3e
0 ETH0.000821267
Register Node158616502022-10-30 15:03:11612 days ago1667142191IN
0x67CdE7AF...30F48Df3e
0 ETH0.0033900610
Set Smoothing Po...158606162022-10-30 11:35:59612 days ago1667129759IN
0x67CdE7AF...30F48Df3e
0 ETH0.000967158.24348486
Set Smoothing Po...158602782022-10-30 10:27:59612 days ago1667125679IN
0x67CdE7AF...30F48Df3e
0 ETH0.000994288.47474243
Set Smoothing Po...158602102022-10-30 10:14:23612 days ago1667124863IN
0x67CdE7AF...30F48Df3e
0 ETH0.0006758.61959255
Initialise Fee D...158601682022-10-30 10:05:59612 days ago1667124359IN
0x67CdE7AF...30F48Df3e
0 ETH0.002681948
Set Smoothing Po...158601502022-10-30 10:02:23612 days ago1667124143IN
0x67CdE7AF...30F48Df3e
0 ETH0.001003968.5572601
Initialise Fee D...158599742022-10-30 9:27:11612 days ago1667122031IN
0x67CdE7AF...30F48Df3e
0 ETH0.00192997.48379712
Initialise Fee D...158599712022-10-30 9:26:35612 days ago1667121995IN
0x67CdE7AF...30F48Df3e
0 ETH0.00299148
Set Smoothing Po...158599362022-10-30 9:19:23612 days ago1667121563IN
0x67CdE7AF...30F48Df3e
0 ETH0.000901677.68540865
Register Node158597412022-10-30 8:40:23612 days ago1667119223IN
0x67CdE7AF...30F48Df3e
0 ETH0.002500267.37555653
Set Smoothing Po...158596062022-10-30 8:13:23612 days ago1667117603IN
0x67CdE7AF...30F48Df3e
0 ETH0.000938588
Register Node158593542022-10-30 7:22:23612 days ago1667114543IN
0x67CdE7AF...30F48Df3e
0 ETH0.003161059.32580904
Initialise Fee D...158582172022-10-30 3:34:11612 days ago1667100851IN
0x67CdE7AF...30F48Df3e
0 ETH0.002030057.87214655
Initialise Fee D...158570492022-10-29 23:39:47612 days ago1667086787IN
0x67CdE7AF...30F48Df3e
0 ETH0.002063028
Set Smoothing Po...158568652022-10-29 23:02:23612 days ago1667084543IN
0x67CdE7AF...30F48Df3e
0 ETH0.001156729.85930715
Initialise Fee D...158567812022-10-29 22:45:35612 days ago1667083535IN
0x67CdE7AF...30F48Df3e
0 ETH0.002520539.77413198
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RocketNodeManager

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 15000 runs

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

pragma solidity 0.7.6;
pragma abicoder v2;

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

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "../RocketBase.sol";
import "../../types/MinipoolStatus.sol";
import "../../types/NodeDetails.sol";
import "../../interface/node/RocketNodeManagerInterface.sol";
import "../../interface/rewards/claims/RocketClaimNodeInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; 
import "../../interface/util/AddressSetStorageInterface.sol";
import "../../interface/node/RocketNodeDistributorFactoryInterface.sol";
import "../../interface/minipool/RocketMinipoolManagerInterface.sol";
import "../../interface/node/RocketNodeDistributorInterface.sol";
import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol";
import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol";
import "../../interface/node/RocketNodeStakingInterface.sol";


// Node registration and management 
contract RocketNodeManager is RocketBase, RocketNodeManagerInterface {

    // Libraries
    using SafeMath for uint256;

    // Events
    event NodeRegistered(address indexed node, uint256 time);
    event NodeTimezoneLocationSet(address indexed node, uint256 time);
    event NodeRewardNetworkChanged(address indexed node, uint256 network);
    event NodeSmoothingPoolStateChanged(address indexed node, bool state);

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

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

    // Get a breakdown of the number of nodes per timezone
    function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) {
        // Get contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Precompute node key
        bytes32 nodeKey = keccak256(abi.encodePacked("nodes.index"));
        // Calculate range
        uint256 totalNodes = addressSetStorage.getCount(nodeKey);
        uint256 max = _offset.add(_limit);
        if (max > totalNodes || _limit == 0) { max = totalNodes; }
        // Create an array with as many elements as there are potential values to return
        TimezoneCount[] memory counts = new TimezoneCount[](max.sub(_offset));
        uint256 uniqueTimezoneCount = 0;
        // Iterate the minipool range
        for (uint256 i = _offset; i < max; i++) {
            address nodeAddress = addressSetStorage.getItem(nodeKey, i);
            string memory timezone = getString(keccak256(abi.encodePacked("node.timezone.location", nodeAddress)));
            // Find existing entry in our array
            bool existing = false;
            for (uint256 j = 0; j < uniqueTimezoneCount; j++) {
                if (keccak256(bytes(counts[j].timezone)) == keccak256(bytes(timezone))) {
                    existing = true;
                    // Increment the counter
                    counts[j].count++;
                    break;
                }
            }
            // Entry was not found, so create a new one
            if (!existing) {
                counts[uniqueTimezoneCount].timezone = timezone;
                counts[uniqueTimezoneCount].count = 1;
                uniqueTimezoneCount++;
            }
        }
        // Dirty hack to cut unused elements off end of return value
        assembly {
            mstore(counts, uniqueTimezoneCount)
        }
        return counts;
    }

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

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

    // Get a node's current withdrawal address
    function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) {
        return rocketStorage.getNodeWithdrawalAddress(_nodeAddress);
    }

    // Get a node's pending withdrawal address
    function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) {
        return rocketStorage.getNodePendingWithdrawalAddress(_nodeAddress);
    }

    // Get a node's timezone location
    function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) {
        return getString(keccak256(abi.encodePacked("node.timezone.location", _nodeAddress)));
    }

    // Register a new node with Rocket Pool
    function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) {
        // Load contracts
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Check node settings
        require(rocketDAOProtocolSettingsNode.getRegistrationEnabled(), "Rocket Pool node registrations are currently disabled");
        // Check timezone location
        require(bytes(_timezoneLocation).length >= 4, "The timezone location is invalid");
        // Initialise node data
        setBool(keccak256(abi.encodePacked("node.exists", msg.sender)), true);
        setString(keccak256(abi.encodePacked("node.timezone.location", msg.sender)), _timezoneLocation);
        // Add node to index
        addressSetStorage.addItem(keccak256(abi.encodePacked("nodes.index")), msg.sender);
        // Initialise fee distributor for this node
        _initialiseFeeDistributor(msg.sender);
        // Set node registration time (uses old storage key name for backwards compatibility)
        setUint(keccak256(abi.encodePacked("rewards.pool.claim.contract.registered.time", "rocketClaimNode", msg.sender)), block.timestamp);
        // Emit node registered event
        emit NodeRegistered(msg.sender, block.timestamp);
    }

    // Get's the timestamp of when a node was registered
    function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("rewards.pool.claim.contract.registered.time", "rocketClaimNode", _nodeAddress)));
    }

    // Set a node's timezone location
    // Only accepts calls from registered nodes
    function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) {
        // Check timezone location
        require(bytes(_timezoneLocation).length >= 4, "The timezone location is invalid");
        // Set timezone location
        setString(keccak256(abi.encodePacked("node.timezone.location", msg.sender)), _timezoneLocation);
        // Emit node timezone location set event
        emit NodeTimezoneLocationSet(msg.sender, block.timestamp);
    }

    // Returns true if node has initialised their fee distributor contract
    function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) {
        // Load contracts
        RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory"));
        // Get distributor address
        address contractAddress = rocketNodeDistributorFactory.getProxyAddress(_nodeAddress);
        // Check if contract exists at that address
        uint32 codeSize;
        assembly {
            codeSize := extcodesize(contractAddress)
        }
        return codeSize > 0;
    }

    // Node operators created before the distributor was implemented must call this to setup their distributor contract
    function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) {
        // Prevent multiple calls
        require(!getFeeDistributorInitialised(msg.sender), "Already initialised");
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        // Calculate and set current average fee numerator
        uint256 count = rocketMinipoolManager.getNodeMinipoolCount(msg.sender);
        if (count > 0){
            uint256 numerator;
            // Note: this loop is safe as long as all current node operators at the time of upgrade have few enough minipools
            for (uint256 i = 0; i < count; i++) {
                RocketMinipoolInterface minipool = RocketMinipoolInterface(rocketMinipoolManager.getMinipoolAt(i));
                if (minipool.getStatus() == MinipoolStatus.Staking){
                    numerator = numerator.add(minipool.getNodeFee());
                }
            }
            setUint(keccak256(abi.encodePacked("node.average.fee.numerator", msg.sender)), numerator);
        }
        // Create the distributor contract
        _initialiseFeeDistributor(msg.sender);
    }

    // Deploys the fee distributor contract for a given node
    function _initialiseFeeDistributor(address _nodeAddress) internal {
        // Load contracts
        RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory"));
        // Create the distributor proxy
        rocketNodeDistributorFactory.createProxy(_nodeAddress);
    }

    // Calculates a nodes average node fee
    function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) {
        // Load contracts
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        // Calculate average
        uint256 denominator = rocketMinipoolManager.getNodeStakingMinipoolCount(_nodeAddress);
        if (denominator == 0) {
            return 0;
        }
        uint256 numerator = getUint(keccak256(abi.encodePacked("node.average.fee.numerator", _nodeAddress)));
        return numerator.div(denominator);
    }

    // Designates which network a node would like their rewards relayed to
    function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) {
        // Confirm the transaction is from the node's current withdrawal address
        address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress);
        require(withdrawalAddress == msg.sender, "Only a tx from a node's withdrawal address can change reward network");
        // Check network is enabled
        RocketDAONodeTrustedSettingsRewardsInterface rocketDAONodeTrustedSettingsRewards = RocketDAONodeTrustedSettingsRewardsInterface(getContractAddress("rocketDAONodeTrustedSettingsRewards"));
        require(rocketDAONodeTrustedSettingsRewards.getNetworkEnabled(_network), "Network is not enabled");
        // Set the network
        setUint(keccak256(abi.encodePacked("node.reward.network", _nodeAddress)), _network);
        // Emit event
        emit NodeRewardNetworkChanged(_nodeAddress, _network);
    }

    // Returns which network a node has designated as their desired reward network
    function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.reward.network", _nodeAddress)));
    }

    // Allows a node to register or deregister from the smoothing pool
    function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) {
        // Ensure registration is enabled
        RocketDAOProtocolSettingsNodeInterface daoSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        require(daoSettingsNode.getSmoothingPoolRegistrationEnabled(), "Smoothing pool registrations are not active");
        // Precompute storage keys
        bytes32 changeKey = keccak256(abi.encodePacked("node.smoothing.pool.changed.time", msg.sender));
        bytes32 stateKey = keccak256(abi.encodePacked("node.smoothing.pool.state", msg.sender));
        // Get from the DAO settings
        RocketDAOProtocolSettingsRewardsInterface daoSettingsRewards = RocketDAOProtocolSettingsRewardsInterface(getContractAddress("rocketDAOProtocolSettingsRewards"));
        uint256 rewardInterval = daoSettingsRewards.getRewardsClaimIntervalTime();
        // Ensure node operator has waited the required time
        uint256 lastChange = getUint(changeKey);
        require(block.timestamp >= lastChange.add(rewardInterval), "Not enough time has passed since changing state");
        // Ensure state is actually changing
        require(getBool(stateKey) != _state, "Invalid state change");
        // Update registration state
        setUint(changeKey, block.timestamp);
        setBool(stateKey, _state);
        // Emit state change event
        emit NodeSmoothingPoolStateChanged(msg.sender, _state);
    }

    // Returns whether a node is registered or not from the smoothing pool
    function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) {
        return getBool(keccak256(abi.encodePacked("node.smoothing.pool.state", _nodeAddress)));
    }

    // Returns the timestamp of when the node last changed their smoothing pool registration state
    function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.smoothing.pool.changed.time", _nodeAddress)));
    }

    // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit)
    function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) {
        // Get contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Precompute node key
        bytes32 nodeKey = keccak256(abi.encodePacked("nodes.index"));
        // Iterate over the requested minipool range
        uint256 totalNodes = getNodeCount();
        uint256 max = _offset.add(_limit);
        if (max > totalNodes || _limit == 0) { max = totalNodes; }
        uint256 count = 0;
        for (uint256 i = _offset; i < max; i++) {
            address nodeAddress = addressSetStorage.getItem(nodeKey, i);
            if (getSmoothingPoolRegistrationState(nodeAddress)) {
                count++;
            }
        }
        return count;
    }

    // Convenience function to return all on-chain details about a given node
    function getNodeDetails(address _nodeAddress) override external view returns (NodeDetails memory nodeDetails) {
        // Get contracts
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        RocketNodeDistributorFactoryInterface rocketNodeDistributorFactory = RocketNodeDistributorFactoryInterface(getContractAddress("rocketNodeDistributorFactory"));
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));
        IERC20 rocketTokenRETH = IERC20(getContractAddress("rocketTokenRETH"));
        IERC20 rocketTokenRPL = IERC20(getContractAddress("rocketTokenRPL"));
        IERC20 rocketTokenRPLFixedSupply = IERC20(getContractAddress("rocketTokenRPLFixedSupply"));
        // Node details
        nodeDetails.withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress);
        nodeDetails.pendingWithdrawalAddress = rocketStorage.getNodePendingWithdrawalAddress(_nodeAddress);
        nodeDetails.exists = getNodeExists(_nodeAddress);
        nodeDetails.registrationTime = getNodeRegistrationTime(_nodeAddress);
        nodeDetails.timezoneLocation = getNodeTimezoneLocation(_nodeAddress);
        nodeDetails.feeDistributorInitialised = getFeeDistributorInitialised(_nodeAddress);
        nodeDetails.rewardNetwork = getRewardNetwork(_nodeAddress);
        // Staking details
        nodeDetails.rplStake = rocketNodeStaking.getNodeRPLStake(_nodeAddress);
        nodeDetails.effectiveRPLStake = rocketNodeStaking.getNodeEffectiveRPLStake(_nodeAddress);
        nodeDetails.minimumRPLStake = rocketNodeStaking.getNodeMinimumRPLStake(_nodeAddress);
        nodeDetails.maximumRPLStake = rocketNodeStaking.getNodeMaximumRPLStake(_nodeAddress);
        nodeDetails.minipoolLimit = rocketNodeStaking.getNodeMinipoolLimit(_nodeAddress);
        // Distributor details
        nodeDetails.feeDistributorAddress = rocketNodeDistributorFactory.getProxyAddress(_nodeAddress);
        // Minipool details
        nodeDetails.minipoolCount = rocketMinipoolManager.getNodeMinipoolCount(_nodeAddress);
        // Balance details
        nodeDetails.balanceETH = _nodeAddress.balance;
        nodeDetails.balanceRETH = rocketTokenRETH.balanceOf(_nodeAddress);
        nodeDetails.balanceRPL = rocketTokenRPL.balanceOf(_nodeAddress);
        nodeDetails.balanceOldRPL = rocketTokenRPLFixedSupply.balanceOf(_nodeAddress);
    }

    // Returns a slice of the node operator address set
    function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) {
        // Get contracts
        AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage"));
        // Precompute node key
        bytes32 nodeKey = keccak256(abi.encodePacked("nodes.index"));
        // Iterate over the requested minipool range
        uint256 totalNodes = getNodeCount();
        uint256 max = _offset.add(_limit);
        if (max > totalNodes || _limit == 0) { max = totalNodes; }
        // Create array big enough for every minipool
        address[] memory nodes = new address[](max.sub(_offset));
        uint256 total = 0;
        for (uint256 i = _offset; i < max; i++) {
            nodes[total] = addressSetStorage.getItem(nodeKey, i);
            total++;
        }
        // Dirty hack to cut unused elements off end of return value
        assembly {
            mstore(nodes, total)
        }
        return nodes;
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity 0.7.6;

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

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

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

abstract contract RocketBase {

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

    // Version of the contract
    uint8 public version;

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


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

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

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

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

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

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

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




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

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


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


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


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

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



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

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

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

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

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

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

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

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

pragma solidity 0.7.6;

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

interface RocketDAONodeTrustedSettingsRewardsInterface {
    function initialise() external;
    function getNetworkEnabled(uint256 _network) external view returns (bool);
}

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

pragma solidity 0.7.6;

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

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

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

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

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

pragma solidity 0.7.6;
pragma abicoder v2;

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

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

interface RocketMinipoolManagerInterface {
    function getMinipoolCount() external view returns (uint256);
    function getStakingMinipoolCount() external view returns (uint256);
    function getFinalisedMinipoolCount() external view returns (uint256);
    function getActiveMinipoolCount() external view returns (uint256);
    function getMinipoolCountPerStatus(uint256 offset, uint256 limit) external view returns (uint256, uint256, uint256, uint256, uint256);
    function getPrelaunchMinipools(uint256 offset, uint256 limit) external view returns (address[] memory);
    function getMinipoolAt(uint256 _index) external view returns (address);
    function getNodeMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeActiveMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeFinalisedMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeStakingMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeMinipoolAt(address _nodeAddress, uint256 _index) external view returns (address);
    function getNodeValidatingMinipoolCount(address _nodeAddress) external view returns (uint256);
    function getNodeValidatingMinipoolAt(address _nodeAddress, uint256 _index) external view returns (address);
    function getMinipoolByPubkey(bytes calldata _pubkey) external view returns (address);
    function getMinipoolExists(address _minipoolAddress) external view returns (bool);
    function getMinipoolDestroyed(address _minipoolAddress) external view returns (bool);
    function getMinipoolPubkey(address _minipoolAddress) external view returns (bytes memory);
    function getMinipoolWithdrawalCredentials(address _minipoolAddress) external pure returns (bytes memory);
    function createMinipool(address _nodeAddress, MinipoolDeposit _depositType, uint256 _salt) external returns (RocketMinipoolInterface);
    function destroyMinipool() external;
    function incrementNodeStakingMinipoolCount(address _nodeAddress) external;
    function decrementNodeStakingMinipoolCount(address _nodeAddress) external;
    function incrementNodeFinalisedMinipoolCount(address _nodeAddress) external;
    function setMinipoolPubkey(bytes calldata _pubkey) external;
    function getMinipoolDetails(address _minipoolAddress) external view returns (MinipoolDetails memory);
}

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

pragma solidity 0.7.6;

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

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

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

pragma solidity 0.7.6;

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

interface RocketNodeDistributorInterface {
    function distribute() external;
}

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

pragma solidity 0.7.6;
pragma abicoder v2;

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

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

interface RocketNodeManagerInterface {

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

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

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

pragma solidity 0.7.6;

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

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

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

pragma solidity 0.7.6;

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

interface RocketClaimNodeInterface {
    function getEnabled() external view returns (bool);
    function getClaimPossible(address _nodeAddress) external view returns (bool);
    function getClaimRewardsPerc(address _nodeAddress) external view returns (uint256);
    function getClaimRewardsAmount(address _nodeAddress) external view returns (uint256);
    function register(address _nodeAddress, bool _enable) external;
    function claim() external;
}

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

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

pragma solidity 0.7.6;

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

// Represents the type of deposits required by a minipool

enum MinipoolDeposit {
    None,    // Marks an invalid deposit type
    Full,    // The minipool requires 32 ETH from the node operator, 16 ETH of which will be refinanced from user deposits
    Half,    // The minipool required 16 ETH from the node operator to be matched with 16 ETH from user deposits
    Empty    // The minipool requires 0 ETH from the node operator to be matched with 32 ETH from user deposits (trusted nodes only)
}

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

pragma solidity 0.7.6;

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

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

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

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

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

pragma solidity 0.7.6;

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

// Represents a minipool's status within the network

enum MinipoolStatus {
    Initialised,    // The minipool has been initialised and is awaiting a deposit of user ETH
    Prelaunch,      // The minipool has enough ETH to begin staking and is awaiting launch by the node operator
    Staking,        // The minipool is currently staking
    Withdrawable,   // The minipool has become withdrawable on the beacon chain and can be withdrawn from by the node operator
    Dissolved       // The minipool has been dissolved and its user deposited ETH has been returned to the deposit pool
}

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

pragma solidity 0.7.6;

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"NodeRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"network","type":"uint256"}],"name":"NodeRewardNetworkChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"NodeSmoothingPoolStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"NodeTimezoneLocationSet","type":"event"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getAverageNodeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getFeeDistributorInitialised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getNodeAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getNodeAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getNodeCountPerTimezone","outputs":[{"components":[{"internalType":"string","name":"timezone","type":"string"},{"internalType":"uint256","name":"count","type":"uint256"}],"internalType":"struct RocketNodeManagerInterface.TimezoneCount[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeDetails","outputs":[{"components":[{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint256","name":"registrationTime","type":"uint256"},{"internalType":"string","name":"timezoneLocation","type":"string"},{"internalType":"bool","name":"feeDistributorInitialised","type":"bool"},{"internalType":"address","name":"feeDistributorAddress","type":"address"},{"internalType":"uint256","name":"rewardNetwork","type":"uint256"},{"internalType":"uint256","name":"rplStake","type":"uint256"},{"internalType":"uint256","name":"effectiveRPLStake","type":"uint256"},{"internalType":"uint256","name":"minimumRPLStake","type":"uint256"},{"internalType":"uint256","name":"maximumRPLStake","type":"uint256"},{"internalType":"uint256","name":"minipoolLimit","type":"uint256"},{"internalType":"uint256","name":"minipoolCount","type":"uint256"},{"internalType":"uint256","name":"balanceETH","type":"uint256"},{"internalType":"uint256","name":"balanceRETH","type":"uint256"},{"internalType":"uint256","name":"balanceRPL","type":"uint256"},{"internalType":"uint256","name":"balanceOldRPL","type":"uint256"},{"internalType":"address","name":"withdrawalAddress","type":"address"},{"internalType":"address","name":"pendingWithdrawalAddress","type":"address"},{"internalType":"bool","name":"smoothingPoolRegistrationState","type":"bool"},{"internalType":"uint256","name":"smoothingPoolRegistrationChanged","type":"uint256"}],"internalType":"struct NodeDetails","name":"nodeDetails","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodePendingWithdrawalAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeRegistrationTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeTimezoneLocation","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeWithdrawalAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getRewardNetwork","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getSmoothingPoolRegisteredNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getSmoothingPoolRegistrationChanged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getSmoothingPoolRegistrationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialiseFeeDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_timezoneLocation","type":"string"}],"name":"registerNode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_network","type":"uint256"}],"name":"setRewardNetwork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setSmoothingPoolRegistrationState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_timezoneLocation","type":"string"}],"name":"setTimezoneLocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

608060405260008054610100600160a81b03191690553480156200002257600080fd5b5060405162003ef738038062003ef7833981016040819052620000459162000078565b6000805460ff196001600160a01b0390931661010002610100600160a81b031990911617919091166002179055620000a8565b6000602082840312156200008a578081fd5b81516001600160a01b0381168114620000a1578182fd5b9392505050565b613e3f80620000b86000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806365d4176f116100d8578063b018f0261161008c578063bafb358111610066578063bafb358114610335578063d565f27614610355578063fd4125131461036857610182565b8063b018f026146102ef578063b715a1aa1461030f578063ba75d8061461032257610182565b806399283f8b116100bd57806399283f8b146102b6578063a4cef9dd146102c9578063a7e6e8b3146102dc57610182565b806365d4176f14610283578063927ece4f146102a357610182565b8063414dd1d21161013a57806354fd4d501161011457806354fd4d50146102465780635b49ff621461025b57806364908a861461027b57610182565b8063414dd1d21461020d57806343f88981146102205780634d99f6331461023357610182565b8063295545401161016b57806329554540146101c55780632d7f21d0146101e557806339bf397e1461020557610182565b806302d8a7321461018757806327c6f43e146101b0575b600080fd5b61019a61019536600461340f565b61037b565b6040516101a791906139c1565b60405180910390f35b6101c36101be3660046134c9565b610468565b005b6101d86101d3366004613566565b61087a565b6040516101a79190613925565b6101f86101f3366004613566565b610b8b565b6040516101a791906138d8565b61019a610d48565b61019a61021b36600461340f565b610e31565b61019a61022e36600461340f565b610f31565b61019a61024136600461340f565b611048565b61024e611064565b6040516101a79190613db2565b61026e61026936600461340f565b61106d565b6040516101a791906138c4565b6101c361110b565b61029661029136600461340f565b611590565b6040516101a791906139b6565b6102966102b136600461340f565b6115c1565b6101c36102c4366004613472565b611693565b6102966102d736600461340f565b611ad5565b6101c36102ea3660046134c9565b611aeb565b6103026102fd36600461340f565b611d5d565b6040516101a791906139ef565b61019a61031d366004613566565b611d73565b61026e610330366004613536565b611edf565b61034861034336600461340f565b611fc4565b6040516101a79190613c76565b6101c3610363366004613447565b612919565b61026e61037636600461340f565b612c1a565b6000816103e18160405160200180807f6e6f64652e657869737473000000000000000000000000000000000000000000815250600b01826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c68565b610432576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b61046183604051602001610446919061378c565b60405160208183030381529060405280519060200120612cf4565b9392505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061053d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106104fd5780518252601f1990920191602091820191016104de565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120612d4e565b6001600160a01b0316816001600160a01b0316146105a2576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b60006105e26040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612da8565b905060006106246040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b9050816001600160a01b03166387b1bb116040518163ffffffff1660e01b815260040160206040518083038186803b15801561065f57600080fd5b505afa158015610673573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610697919061348e565b6106bc5760405162461bcd60e51b81526004016106b390613a96565b60405180910390fd5b60048510156106dd5760405162461bcd60e51b81526004016106b390613af3565b61070e336040516020016106f1919061368a565b604051602081830303815290604052805190602001206001612e65565b610774336040516020016107229190613818565b6040516020818303038152906040528051906020012087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612eee92505050565b806001600160a01b03166388927166604051602001610792906137ef565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b81526004016107c69291906139ca565b600060405180830381600087803b1580156107e057600080fd5b505af11580156107f4573d6000803e3d6000fd5b5050505061080133612fb3565b61083133604051602001610815919061378c565b6040516020818303038152906040528051906020012042613055565b336001600160a01b03167ff773bca07d020a1bc1fdd45ea3db573da547dd27180143afaf075c158a8475944260405161086a91906139c1565b60405180910390a2505050505050565b606060006108bc6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b905060006040516020016108cf906137ef565b6040516020818303038152906040528051906020012090506000826001600160a01b031663c9d6fee9836040518263ffffffff1660e01b815260040161091591906139c1565b60206040518083038186803b15801561092d57600080fd5b505afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610965919061354e565b9050600061097387876130c1565b905081811180610981575085155b156109895750805b6000610995828961311b565b67ffffffffffffffff811180156109ab57600080fd5b506040519080825280602002602001820160405280156109e557816020015b6109d261333b565b8152602001906001900390816109ca5790505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0389169063f3358a3a90610a3e908a9086906004016139e1565b60206040518083038186803b158015610a5657600080fd5b505afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e919061342b565b90506000610ac182604051602001610aa69190613818565b60405160208183030381529060405280519060200120613178565b90506000805b85811015610b2d578280519060200120878281518110610ae357fe5b602002602001015160000151805190602001201415610b255760019150868181518110610b0c57fe5b6020908102919091018101510180516001019052610b2d565b600101610ac7565b5080610b725781868681518110610b4057fe5b6020026020010151600001819052506001868681518110610b5d57fe5b60209081029190910181015101526001909401935b5050506001016109ec565b508152979650505050505050565b60606000610bcd6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b90506000604051602001610be0906137ef565b6040516020818303038152906040528051906020012090506000610c02610d48565b90506000610c1087876130c1565b905081811180610c1e575085155b15610c265750805b6000610c32828961311b565b67ffffffffffffffff81118015610c4857600080fd5b50604051908082528060200260200182016040528015610c72578160200160208202803683370190505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526001600160a01b0388169063f3358a3a90610cc890899085906004016139e1565b60206040518083038186803b158015610ce057600080fd5b505afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d18919061342b565b838381518110610d2457fe5b6001600160a01b039092166020928302919091019091015260019182019101610c79565b600080610d896040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b9050806001600160a01b031663c9d6fee9604051602001610da9906137ef565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610ddb91906139c1565b60206040518083038186803b158015610df357600080fd5b505afa158015610e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2b919061354e565b91505090565b600080610e726040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612da8565b90506000816001600160a01b03166357b4ef6b856040518263ffffffff1660e01b8152600401610ea291906138c4565b60206040518083038186803b158015610eba57600080fd5b505afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef2919061354e565b905080610f0457600092505050610f2c565b6000610f1a85604051602001610446919061386e565b9050610f2681836132d4565b93505050505b919050565b60006040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030610fc78260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461102c576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6110408460405160200161044691906136e0565b949350505050565b600061105e826040516020016104469190613634565b92915050565b60005460ff1681565b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff62906110bb9085906004016138c4565b60206040518083038186803b1580156110d357600080fd5b505afa1580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e919061342b565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061119f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611204576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f909301909352815191012061125d90612c68565b6112ae576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6112b7336115c1565b156112d45760405162461bcd60e51b81526004016106b390613a02565b60006113146040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612da8565b90506000816001600160a01b0316631ce9ec33336040518263ffffffff1660e01b815260040161134491906138c4565b60206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611394919061354e565b90508015611580576000805b8281101561154d576040517feff7319f0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0386169063eff7319f906113f09085906004016139c1565b60206040518083038186803b15801561140857600080fd5b505afa15801561141c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611440919061342b565b90506002816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b15801561147d57600080fd5b505afa158015611491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b591906134aa565b60048111156114c057fe5b141561154457611541816001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b15801561150257600080fd5b505afa158015611516573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153a919061354e565b84906130c1565b92505b506001016113a0565b5061157e33604051602001611562919061386e565b6040516020818303038152906040528051906020012082613055565b505b61158933612fb3565b5050505050565b600061105e826040516020016115a6919061368a565b60405160208183030381529060405280519060200120612c68565b6000806116026040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612da8565b90506000816001600160a01b031663fa2a5b01856040518263ffffffff1660e01b815260040161163291906138c4565b60206040518083038186803b15801561164a57600080fd5b505afa15801561165e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611682919061342b565b3b63ffffffff161515949350505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306117278260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461178c576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206117e590612c68565b611836576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b60006118766040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612da8565b9050806001600160a01b03166301dd16296040518163ffffffff1660e01b815260040160206040518083038186803b1580156118b157600080fd5b505afa1580156118c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e9919061348e565b6119055760405162461bcd60e51b81526004016106b390613a39565b6000336040516020016119189190613634565b6040516020818303038152906040528051906020012090506000336040516020016119439190613736565b604051602081830303815290604052805190602001209050600061199b6040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e677352657761726473815250612da8565b90506000816001600160a01b03166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b1580156119d857600080fd5b505afa1580156119ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a10919061354e565b90506000611a1d85612cf4565b9050611a2981836130c1565b421015611a485760405162461bcd60e51b81526004016106b390613b28565b891515611a5485612c68565b15151415611a745760405162461bcd60e51b81526004016106b390613c3f565b611a7e8542613055565b611a88848b612e65565b336001600160a01b03167fed2d3ca39683fb0f50a70ed75c33a19bfe200e529d99e6f7518453b3fc4e9be48b604051611ac191906139b6565b60405180910390a250505050505050505050565b600061105e826040516020016115a69190613736565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030611b7f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611be4576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120611c3d90612c68565b611c8e576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6004841015611caf5760405162461bcd60e51b81526004016106b390613af3565b611d1533604051602001611cc39190613818565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612eee92505050565b336001600160a01b03167fbb0b10d06b6fa081d0905e789877ce0321fafa4702ffeacaaff6e2d38063616a42604051611d4e91906139c1565b60405180910390a25050505050565b606061105e82604051602001610aa69190613818565b600080611db46040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b90506000604051602001611dc7906137ef565b6040516020818303038152906040528051906020012090506000611de9610d48565b90506000611df787876130c1565b905081811180611e05575085155b15611e0d5750805b6000875b82811015611ed3576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0388169063f3358a3a90611e6390899086906004016139e1565b60206040518083038186803b158015611e7b57600080fd5b505afa158015611e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb3919061342b565b9050611ebe81611ad5565b15611eca576001909201915b50600101611e11565b50979650505050505050565b600080611f206040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b9050806001600160a01b031663f3358a3a604051602001611f40906137ef565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b8152600401611f749291906139e1565b60206040518083038186803b158015611f8c57600080fd5b505afa158015611fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610461919061342b565b611fcc613355565b600061200c6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250612da8565b9050600061204e6040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612da8565b905060006120906040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612da8565b905060006120d26040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250612da8565b905060006121146040518060400160405280600e81526020017f726f636b6574546f6b656e52504c000000000000000000000000000000000000815250612da8565b905060006121566040518060400160405280601981526020017f726f636b6574546f6b656e52504c4669786564537570706c7900000000000000815250612da8565b6000546040517f5b49ff6200000000000000000000000000000000000000000000000000000000815291925061010090046001600160a01b031690635b49ff62906121a5908b906004016138c4565b60206040518083038186803b1580156121bd57600080fd5b505afa1580156121d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f5919061342b565b6001600160a01b039081166102008901526000546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091049091169063fd4125139061224d908b906004016138c4565b60206040518083038186803b15801561226557600080fd5b505afa158015612279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229d919061342b565b6001600160a01b03166102208801526122b588611590565b151587526122c28861037b565b60208801526122d088611d5d565b60408801526122de886115c1565b151560608801526122ee88610f31565b60a08801526040517f9961cee40000000000000000000000000000000000000000000000000000000081526001600160a01b03871690639961cee490612338908b906004016138c4565b60206040518083038186803b15801561235057600080fd5b505afa158015612364573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612388919061354e565b60c08801526040517ff0d19b890000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063f0d19b89906123d2908b906004016138c4565b60206040518083038186803b1580156123ea57600080fd5b505afa1580156123fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612422919061354e565b60e08801526040517f03fa87b40000000000000000000000000000000000000000000000000000000081526001600160a01b038716906303fa87b49061246c908b906004016138c4565b60206040518083038186803b15801561248457600080fd5b505afa158015612498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bc919061354e565b6101008801526040517f4e58ff6e0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690634e58ff6e90612507908b906004016138c4565b60206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612557919061354e565b6101208801526040517f90f7ff4c0000000000000000000000000000000000000000000000000000000081526001600160a01b038716906390f7ff4c906125a2908b906004016138c4565b60206040518083038186803b1580156125ba57600080fd5b505afa1580156125ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f2919061354e565b6101408801526040517ffa2a5b010000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063fa2a5b019061263d908b906004016138c4565b60206040518083038186803b15801561265557600080fd5b505afa158015612669573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061268d919061342b565b6001600160a01b0390811660808901526040517f1ce9ec3300000000000000000000000000000000000000000000000000000000815290851690631ce9ec33906126db908b906004016138c4565b60206040518083038186803b1580156126f357600080fd5b505afa158015612707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272b919061354e565b6101608801526001600160a01b03808916316101808901526040517f70a08231000000000000000000000000000000000000000000000000000000008152908416906370a0823190612781908b906004016138c4565b60206040518083038186803b15801561279957600080fd5b505afa1580156127ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d1919061354e565b6101a08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038316906370a082319061281c908b906004016138c4565b60206040518083038186803b15801561283457600080fd5b505afa158015612848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286c919061354e565b6101c08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038216906370a08231906128b7908b906004016138c4565b60206040518083038186803b1580156128cf57600080fd5b505afa1580156128e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612907919061354e565b6101e088015250949695505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306129ad8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614612a12576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff6290612a609088906004016138c4565b60206040518083038186803b158015612a7857600080fd5b505afa158015612a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab0919061342b565b90506001600160a01b0381163314612ada5760405162461bcd60e51b81526004016106b390613bbc565b6000612afd604051806060016040528060238152602001613de760239139612da8565b6040517f6dd2623e0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636dd2623e90612b459088906004016139c1565b60206040518083038186803b158015612b5d57600080fd5b505afa158015612b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b95919061348e565b612bb15760405162461bcd60e51b81526004016106b390613b85565b612be186604051602001612bc591906136e0565b6040516020818303038152906040528051906020012086613055565b856001600160a01b03167f7c50987deec06761094239e9ff28caa9cfdd305f9c65011c284a0e40cbf4cfdc8660405161086a91906139c1565b600080546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b03169063fd412513906110bb9085906004016138c4565b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc257600080fd5b505afa158015612cd6573d6000803e3d6000fd5b505050506040513d6020811015612cec57600080fd5b505192915050565b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc257600080fd5b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc257600080fd5b600080612e088360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b90506001600160a01b03811661105e576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b60008054604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101869052841515602482015290516101009092046001600160a01b03169263abfdcced9260448084019382900301818387803b158015612ed257600080fd5b505af1158015612ee6573d6000803e3d6000fd5b505050505050565b600060019054906101000a90046001600160a01b03166001600160a01b0316636e89955083836040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612f66578181015183820152602001612f4e565b50505050905090810190601f168015612f935780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015612ed257600080fd5b6000612ff36040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612da8565b6040517f6140c54c0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636140c54c9061303b9085906004016138c4565b600060405180830381600087803b158015612ed257600080fd5b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b158015612ed257600080fd5b600082820183811015610461576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613172576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008054604080517f986e791a0000000000000000000000000000000000000000000000000000000081526004810185905290516060936101009093046001600160a01b03169263986e791a9260248082019391829003018186803b1580156131e057600080fd5b505afa1580156131f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561321d57600080fd5b810190808051604051939291908464010000000082111561323d57600080fd5b90830190602082018581111561325257600080fd5b825164010000000081118282018810171561326c57600080fd5b82525081516020918201929091019080838360005b83811015613299578181015183820152602001613281565b50505050905090810190601f1680156132c65780820380516001836020036101000a031916815260200191505b506040525050509050919050565b600080821161332a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161333357fe5b049392505050565b604051806040016040528060608152602001600081525090565b604051806102800160405280600015158152602001600081526020016060815260200160001515815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600015158152602001600081525090565b600060208284031215613420578081fd5b813561046181613dc0565b60006020828403121561343c578081fd5b815161046181613dc0565b60008060408385031215613459578081fd5b823561346481613dc0565b946020939093013593505050565b600060208284031215613483578081fd5b813561046181613dd8565b60006020828403121561349f578081fd5b815161046181613dd8565b6000602082840312156134bb578081fd5b815160058110610461578182fd5b600080602083850312156134db578182fd5b823567ffffffffffffffff808211156134f2578384fd5b818501915085601f830112613505578384fd5b813581811115613513578485fd5b866020828501011115613524578485fd5b60209290920196919550909350505050565b600060208284031215613547578081fd5b5035919050565b60006020828403121561355f578081fd5b5051919050565b60008060408385031215613578578182fd5b50508035926020909101359150565b6001600160a01b03169052565b15159052565b60008151808452815b818110156135bf576020818501810151868301820152016135a3565b818111156135d05782602083870101525b50601f01601f19169290920160200192915050565b7f726577617264732e706f6f6c2e636c61696d2e636f6e74726163742e7265676981527f7374657265642e74696d650000000000000000000000000000000000000000006020820152602b0190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e6368616e6765642e74696d65815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602082015260340190565b7f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600b820152601f0190565b7f6e6f64652e7265776172642e6e6574776f726b00000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601382015260270190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e737461746500000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166019820152602d0190565b6000613797826135e5565b7f726f636b6574436c61696d4e6f64650000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f840152505060230190565b7f6e6f6465732e696e6465780000000000000000000000000000000000000000008152600b0190565b7f6e6f64652e74696d657a6f6e652e6c6f636174696f6e00000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166016820152602a0190565b7f6e6f64652e617665726167652e6665652e6e756d657261746f72000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601a820152602e0190565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156139195783516001600160a01b0316835292840192918401916001016138f4565b50909695505050505050565b60208082528251828201819052600091906040908185019080840286018301878501865b838110156139a8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08984030185528151805187855261398b8886018261359a565b918901519489019490945294870194925090860190600101613949565b509098975050505050505050565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b600060208252610461602083018461359a565b60208082526013908201527f416c726561647920696e697469616c6973656400000000000000000000000000604082015260600190565b6020808252602b908201527f536d6f6f7468696e6720706f6f6c20726567697374726174696f6e732061726560408201527f206e6f7420616374697665000000000000000000000000000000000000000000606082015260800190565b60208082526035908201527f526f636b657420506f6f6c206e6f646520726567697374726174696f6e73206160408201527f72652063757272656e746c792064697361626c65640000000000000000000000606082015260800190565b6020808252818101527f5468652074696d657a6f6e65206c6f636174696f6e20697320696e76616c6964604082015260600190565b6020808252602f908201527f4e6f7420656e6f7567682074696d6520686173207061737365642073696e636560408201527f206368616e67696e672073746174650000000000000000000000000000000000606082015260800190565b60208082526016908201527f4e6574776f726b206973206e6f7420656e61626c656400000000000000000000604082015260600190565b60208082526044908201527f4f6e6c7920612074782066726f6d2061206e6f6465277320776974686472617760408201527f616c20616464726573732063616e206368616e676520726577617264206e657460608201527f776f726b00000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526014908201527f496e76616c6964207374617465206368616e6765000000000000000000000000604082015260600190565b600060208252613c8a602083018451613594565b602083015160408301526040830151610280806060850152613cb06102a085018361359a565b91506060850151613cc46080860182613594565b506080850151613cd760a0860182613587565b5060a085015160c08581019190915285015160e08086019190915285015161010080860191909152850151610120808601919091528501516101408086019190915285015161016080860191909152850151610180808601919091528501516101a0808601919091528501516101c0808601919091528501516101e08086019190915285015161020080860191909152850151610220613d7981870183613587565b8601519050610240613d8d86820183613587565b8601519050610260613da186820183613594565b959095015193019290925250919050565b60ff91909116815260200190565b6001600160a01b0381168114613dd557600080fd5b50565b8015158114613dd557600080fdfe726f636b657444414f4e6f64655472757374656453657474696e677352657761726473a2646970667358221220b8aa619d1b92cb57fd4ffcb1da3484d0155e693d02194f7fcfe7c4912018b6bd64736f6c634300070600330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101825760003560e01c806365d4176f116100d8578063b018f0261161008c578063bafb358111610066578063bafb358114610335578063d565f27614610355578063fd4125131461036857610182565b8063b018f026146102ef578063b715a1aa1461030f578063ba75d8061461032257610182565b806399283f8b116100bd57806399283f8b146102b6578063a4cef9dd146102c9578063a7e6e8b3146102dc57610182565b806365d4176f14610283578063927ece4f146102a357610182565b8063414dd1d21161013a57806354fd4d501161011457806354fd4d50146102465780635b49ff621461025b57806364908a861461027b57610182565b8063414dd1d21461020d57806343f88981146102205780634d99f6331461023357610182565b8063295545401161016b57806329554540146101c55780632d7f21d0146101e557806339bf397e1461020557610182565b806302d8a7321461018757806327c6f43e146101b0575b600080fd5b61019a61019536600461340f565b61037b565b6040516101a791906139c1565b60405180910390f35b6101c36101be3660046134c9565b610468565b005b6101d86101d3366004613566565b61087a565b6040516101a79190613925565b6101f86101f3366004613566565b610b8b565b6040516101a791906138d8565b61019a610d48565b61019a61021b36600461340f565b610e31565b61019a61022e36600461340f565b610f31565b61019a61024136600461340f565b611048565b61024e611064565b6040516101a79190613db2565b61026e61026936600461340f565b61106d565b6040516101a791906138c4565b6101c361110b565b61029661029136600461340f565b611590565b6040516101a791906139b6565b6102966102b136600461340f565b6115c1565b6101c36102c4366004613472565b611693565b6102966102d736600461340f565b611ad5565b6101c36102ea3660046134c9565b611aeb565b6103026102fd36600461340f565b611d5d565b6040516101a791906139ef565b61019a61031d366004613566565b611d73565b61026e610330366004613536565b611edf565b61034861034336600461340f565b611fc4565b6040516101a79190613c76565b6101c3610363366004613447565b612919565b61026e61037636600461340f565b612c1a565b6000816103e18160405160200180807f6e6f64652e657869737473000000000000000000000000000000000000000000815250600b01826001600160a01b031660601b815260140191505060405160208183030381529060405280519060200120612c68565b610432576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b61046183604051602001610446919061378c565b60405160208183030381529060405280519060200120612cf4565b9392505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061053d8260405160200180807f636f6e74726163742e616464726573730000000000000000000000000000000081525060100182805190602001908083835b602083106104fd5780518252601f1990920191602091820191016104de565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120612d4e565b6001600160a01b0316816001600160a01b0316146105a2576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b60006105e26040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612da8565b905060006106246040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b9050816001600160a01b03166387b1bb116040518163ffffffff1660e01b815260040160206040518083038186803b15801561065f57600080fd5b505afa158015610673573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610697919061348e565b6106bc5760405162461bcd60e51b81526004016106b390613a96565b60405180910390fd5b60048510156106dd5760405162461bcd60e51b81526004016106b390613af3565b61070e336040516020016106f1919061368a565b604051602081830303815290604052805190602001206001612e65565b610774336040516020016107229190613818565b6040516020818303038152906040528051906020012087878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612eee92505050565b806001600160a01b03166388927166604051602001610792906137ef565b60405160208183030381529060405280519060200120336040518363ffffffff1660e01b81526004016107c69291906139ca565b600060405180830381600087803b1580156107e057600080fd5b505af11580156107f4573d6000803e3d6000fd5b5050505061080133612fb3565b61083133604051602001610815919061378c565b6040516020818303038152906040528051906020012042613055565b336001600160a01b03167ff773bca07d020a1bc1fdd45ea3db573da547dd27180143afaf075c158a8475944260405161086a91906139c1565b60405180910390a2505050505050565b606060006108bc6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b905060006040516020016108cf906137ef565b6040516020818303038152906040528051906020012090506000826001600160a01b031663c9d6fee9836040518263ffffffff1660e01b815260040161091591906139c1565b60206040518083038186803b15801561092d57600080fd5b505afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610965919061354e565b9050600061097387876130c1565b905081811180610981575085155b156109895750805b6000610995828961311b565b67ffffffffffffffff811180156109ab57600080fd5b506040519080825280602002602001820160405280156109e557816020015b6109d261333b565b8152602001906001900390816109ca5790505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0389169063f3358a3a90610a3e908a9086906004016139e1565b60206040518083038186803b158015610a5657600080fd5b505afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e919061342b565b90506000610ac182604051602001610aa69190613818565b60405160208183030381529060405280519060200120613178565b90506000805b85811015610b2d578280519060200120878281518110610ae357fe5b602002602001015160000151805190602001201415610b255760019150868181518110610b0c57fe5b6020908102919091018101510180516001019052610b2d565b600101610ac7565b5080610b725781868681518110610b4057fe5b6020026020010151600001819052506001868681518110610b5d57fe5b60209081029190910181015101526001909401935b5050506001016109ec565b508152979650505050505050565b60606000610bcd6040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b90506000604051602001610be0906137ef565b6040516020818303038152906040528051906020012090506000610c02610d48565b90506000610c1087876130c1565b905081811180610c1e575085155b15610c265750805b6000610c32828961311b565b67ffffffffffffffff81118015610c4857600080fd5b50604051908082528060200260200182016040528015610c72578160200160208202803683370190505b5090506000885b83811015610b7d576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526001600160a01b0388169063f3358a3a90610cc890899085906004016139e1565b60206040518083038186803b158015610ce057600080fd5b505afa158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d18919061342b565b838381518110610d2457fe5b6001600160a01b039092166020928302919091019091015260019182019101610c79565b600080610d896040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b9050806001600160a01b031663c9d6fee9604051602001610da9906137ef565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610ddb91906139c1565b60206040518083038186803b158015610df357600080fd5b505afa158015610e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2b919061354e565b91505090565b600080610e726040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612da8565b90506000816001600160a01b03166357b4ef6b856040518263ffffffff1660e01b8152600401610ea291906138c4565b60206040518083038186803b158015610eba57600080fd5b505afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef2919061354e565b905080610f0457600092505050610f2c565b6000610f1a85604051602001610446919061386e565b9050610f2681836132d4565b93505050505b919050565b60006040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030610fc78260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461102c576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b6110408460405160200161044691906136e0565b949350505050565b600061105e826040516020016104469190613634565b92915050565b60005460ff1681565b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff62906110bb9085906004016138c4565b60206040518083038186803b1580156110d357600080fd5b505afa1580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e919061342b565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e616765720000000000000000000000000000008152503061119f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611204576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f909301909352815191012061125d90612c68565b6112ae576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6112b7336115c1565b156112d45760405162461bcd60e51b81526004016106b390613a02565b60006113146040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612da8565b90506000816001600160a01b0316631ce9ec33336040518263ffffffff1660e01b815260040161134491906138c4565b60206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611394919061354e565b90508015611580576000805b8281101561154d576040517feff7319f0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0386169063eff7319f906113f09085906004016139c1565b60206040518083038186803b15801561140857600080fd5b505afa15801561141c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611440919061342b565b90506002816001600160a01b0316634e69d5606040518163ffffffff1660e01b815260040160206040518083038186803b15801561147d57600080fd5b505afa158015611491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b591906134aa565b60048111156114c057fe5b141561154457611541816001600160a01b031663e71501346040518163ffffffff1660e01b815260040160206040518083038186803b15801561150257600080fd5b505afa158015611516573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153a919061354e565b84906130c1565b92505b506001016113a0565b5061157e33604051602001611562919061386e565b6040516020818303038152906040528051906020012082613055565b505b61158933612fb3565b5050505050565b600061105e826040516020016115a6919061368a565b60405160208183030381529060405280519060200120612c68565b6000806116026040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612da8565b90506000816001600160a01b031663fa2a5b01856040518263ffffffff1660e01b815260040161163291906138c4565b60206040518083038186803b15801561164a57600080fd5b505afa15801561165e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611682919061342b565b3b63ffffffff161515949350505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306117278260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b03161461178c576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f90930190935281519101206117e590612c68565b611836576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b60006118766040518060400160405280601d81526020017f726f636b657444414f50726f746f636f6c53657474696e67734e6f6465000000815250612da8565b9050806001600160a01b03166301dd16296040518163ffffffff1660e01b815260040160206040518083038186803b1580156118b157600080fd5b505afa1580156118c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e9919061348e565b6119055760405162461bcd60e51b81526004016106b390613a39565b6000336040516020016119189190613634565b6040516020818303038152906040528051906020012090506000336040516020016119439190613736565b604051602081830303815290604052805190602001209050600061199b6040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e677352657761726473815250612da8565b90506000816001600160a01b03166394e5d5126040518163ffffffff1660e01b815260040160206040518083038186803b1580156119d857600080fd5b505afa1580156119ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a10919061354e565b90506000611a1d85612cf4565b9050611a2981836130c1565b421015611a485760405162461bcd60e51b81526004016106b390613b28565b891515611a5485612c68565b15151415611a745760405162461bcd60e51b81526004016106b390613c3f565b611a7e8542613055565b611a88848b612e65565b336001600160a01b03167fed2d3ca39683fb0f50a70ed75c33a19bfe200e529d99e6f7518453b3fc4e9be48b604051611ac191906139b6565b60405180910390a250505050505050505050565b600061105e826040516020016115a69190613736565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e6167657200000000000000000000000000000081525030611b7f8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614611be4576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b604080517f6e6f64652e65786973747300000000000000000000000000000000000000000060208083019190915233606081901b602b8401528351601f818503018152603f9093019093528151910120611c3d90612c68565b611c8e576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206e6f64650000000000000000000000000000000000000000604482015290519081900360640190fd5b6004841015611caf5760405162461bcd60e51b81526004016106b390613af3565b611d1533604051602001611cc39190613818565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612eee92505050565b336001600160a01b03167fbb0b10d06b6fa081d0905e789877ce0321fafa4702ffeacaaff6e2d38063616a42604051611d4e91906139c1565b60405180910390a25050505050565b606061105e82604051602001610aa69190613818565b600080611db46040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b90506000604051602001611dc7906137ef565b6040516020818303038152906040528051906020012090506000611de9610d48565b90506000611df787876130c1565b905081811180611e05575085155b15611e0d5750805b6000875b82811015611ed3576040517ff3358a3a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0388169063f3358a3a90611e6390899086906004016139e1565b60206040518083038186803b158015611e7b57600080fd5b505afa158015611e8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb3919061342b565b9050611ebe81611ad5565b15611eca576001909201915b50600101611e11565b50979650505050505050565b600080611f206040518060400160405280601181526020017f6164647265737353657453746f72616765000000000000000000000000000000815250612da8565b9050806001600160a01b031663f3358a3a604051602001611f40906137ef565b60405160208183030381529060405280519060200120856040518363ffffffff1660e01b8152600401611f749291906139e1565b60206040518083038186803b158015611f8c57600080fd5b505afa158015611fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610461919061342b565b611fcc613355565b600061200c6040518060400160405280601181526020017f726f636b65744e6f64655374616b696e67000000000000000000000000000000815250612da8565b9050600061204e6040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612da8565b905060006120906040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e616765720000000000000000000000815250612da8565b905060006120d26040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250612da8565b905060006121146040518060400160405280600e81526020017f726f636b6574546f6b656e52504c000000000000000000000000000000000000815250612da8565b905060006121566040518060400160405280601981526020017f726f636b6574546f6b656e52504c4669786564537570706c7900000000000000815250612da8565b6000546040517f5b49ff6200000000000000000000000000000000000000000000000000000000815291925061010090046001600160a01b031690635b49ff62906121a5908b906004016138c4565b60206040518083038186803b1580156121bd57600080fd5b505afa1580156121d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f5919061342b565b6001600160a01b039081166102008901526000546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091049091169063fd4125139061224d908b906004016138c4565b60206040518083038186803b15801561226557600080fd5b505afa158015612279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229d919061342b565b6001600160a01b03166102208801526122b588611590565b151587526122c28861037b565b60208801526122d088611d5d565b60408801526122de886115c1565b151560608801526122ee88610f31565b60a08801526040517f9961cee40000000000000000000000000000000000000000000000000000000081526001600160a01b03871690639961cee490612338908b906004016138c4565b60206040518083038186803b15801561235057600080fd5b505afa158015612364573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612388919061354e565b60c08801526040517ff0d19b890000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063f0d19b89906123d2908b906004016138c4565b60206040518083038186803b1580156123ea57600080fd5b505afa1580156123fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612422919061354e565b60e08801526040517f03fa87b40000000000000000000000000000000000000000000000000000000081526001600160a01b038716906303fa87b49061246c908b906004016138c4565b60206040518083038186803b15801561248457600080fd5b505afa158015612498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bc919061354e565b6101008801526040517f4e58ff6e0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690634e58ff6e90612507908b906004016138c4565b60206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612557919061354e565b6101208801526040517f90f7ff4c0000000000000000000000000000000000000000000000000000000081526001600160a01b038716906390f7ff4c906125a2908b906004016138c4565b60206040518083038186803b1580156125ba57600080fd5b505afa1580156125ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f2919061354e565b6101408801526040517ffa2a5b010000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063fa2a5b019061263d908b906004016138c4565b60206040518083038186803b15801561265557600080fd5b505afa158015612669573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061268d919061342b565b6001600160a01b0390811660808901526040517f1ce9ec3300000000000000000000000000000000000000000000000000000000815290851690631ce9ec33906126db908b906004016138c4565b60206040518083038186803b1580156126f357600080fd5b505afa158015612707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272b919061354e565b6101608801526001600160a01b03808916316101808901526040517f70a08231000000000000000000000000000000000000000000000000000000008152908416906370a0823190612781908b906004016138c4565b60206040518083038186803b15801561279957600080fd5b505afa1580156127ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d1919061354e565b6101a08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038316906370a082319061281c908b906004016138c4565b60206040518083038186803b15801561283457600080fd5b505afa158015612848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286c919061354e565b6101c08801526040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038216906370a08231906128b7908b906004016138c4565b60206040518083038186803b1580156128cf57600080fd5b505afa1580156128e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612907919061354e565b6101e088015250949695505050505050565b6040518060400160405280601181526020017f726f636b65744e6f64654d616e61676572000000000000000000000000000000815250306129ad8260405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b6001600160a01b0316816001600160a01b031614612a12576040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e747261637400000000604482015290519081900360640190fd5b600080546040517f5b49ff620000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b031690635b49ff6290612a609088906004016138c4565b60206040518083038186803b158015612a7857600080fd5b505afa158015612a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab0919061342b565b90506001600160a01b0381163314612ada5760405162461bcd60e51b81526004016106b390613bbc565b6000612afd604051806060016040528060238152602001613de760239139612da8565b6040517f6dd2623e0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636dd2623e90612b459088906004016139c1565b60206040518083038186803b158015612b5d57600080fd5b505afa158015612b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b95919061348e565b612bb15760405162461bcd60e51b81526004016106b390613b85565b612be186604051602001612bc591906136e0565b6040516020818303038152906040528051906020012086613055565b856001600160a01b03167f7c50987deec06761094239e9ff28caa9cfdd305f9c65011c284a0e40cbf4cfdc8660405161086a91906139c1565b600080546040517ffd4125130000000000000000000000000000000000000000000000000000000081526101009091046001600160a01b03169063fd412513906110bb9085906004016138c4565b60008060019054906101000a90046001600160a01b03166001600160a01b0316637ae1cfca836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc257600080fd5b505afa158015612cd6573d6000803e3d6000fd5b505050506040513d6020811015612cec57600080fd5b505192915050565b60008060019054906101000a90046001600160a01b03166001600160a01b031663bd02d0f5836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc257600080fd5b60008060019054906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612cc257600080fd5b600080612e088360405160200180807f636f6e74726163742e61646472657373000000000000000000000000000000008152506010018280519060200190808383602083106104fd5780518252601f1990920191602091820191016104de565b90506001600160a01b03811661105e576040805162461bcd60e51b815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e640000000000000000000000000000604482015290519081900360640190fd5b60008054604080517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101869052841515602482015290516101009092046001600160a01b03169263abfdcced9260448084019382900301818387803b158015612ed257600080fd5b505af1158015612ee6573d6000803e3d6000fd5b505050505050565b600060019054906101000a90046001600160a01b03166001600160a01b0316636e89955083836040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612f66578181015183820152602001612f4e565b50505050905090810190601f168015612f935780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015612ed257600080fd5b6000612ff36040518060400160405280601c81526020017f726f636b65744e6f64654469737472696275746f72466163746f727900000000815250612da8565b6040517f6140c54c0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690636140c54c9061303b9085906004016138c4565b600060405180830381600087803b158015612ed257600080fd5b60008054604080517fe2a4853a000000000000000000000000000000000000000000000000000000008152600481018690526024810185905290516101009092046001600160a01b03169263e2a4853a9260448084019382900301818387803b158015612ed257600080fd5b600082820183811015610461576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613172576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008054604080517f986e791a0000000000000000000000000000000000000000000000000000000081526004810185905290516060936101009093046001600160a01b03169263986e791a9260248082019391829003018186803b1580156131e057600080fd5b505afa1580156131f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561321d57600080fd5b810190808051604051939291908464010000000082111561323d57600080fd5b90830190602082018581111561325257600080fd5b825164010000000081118282018810171561326c57600080fd5b82525081516020918201929091019080838360005b83811015613299578181015183820152602001613281565b50505050905090810190601f1680156132c65780820380516001836020036101000a031916815260200191505b506040525050509050919050565b600080821161332a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161333357fe5b049392505050565b604051806040016040528060608152602001600081525090565b604051806102800160405280600015158152602001600081526020016060815260200160001515815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600015158152602001600081525090565b600060208284031215613420578081fd5b813561046181613dc0565b60006020828403121561343c578081fd5b815161046181613dc0565b60008060408385031215613459578081fd5b823561346481613dc0565b946020939093013593505050565b600060208284031215613483578081fd5b813561046181613dd8565b60006020828403121561349f578081fd5b815161046181613dd8565b6000602082840312156134bb578081fd5b815160058110610461578182fd5b600080602083850312156134db578182fd5b823567ffffffffffffffff808211156134f2578384fd5b818501915085601f830112613505578384fd5b813581811115613513578485fd5b866020828501011115613524578485fd5b60209290920196919550909350505050565b600060208284031215613547578081fd5b5035919050565b60006020828403121561355f578081fd5b5051919050565b60008060408385031215613578578182fd5b50508035926020909101359150565b6001600160a01b03169052565b15159052565b60008151808452815b818110156135bf576020818501810151868301820152016135a3565b818111156135d05782602083870101525b50601f01601f19169290920160200192915050565b7f726577617264732e706f6f6c2e636c61696d2e636f6e74726163742e7265676981527f7374657265642e74696d650000000000000000000000000000000000000000006020820152602b0190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e6368616e6765642e74696d65815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602082015260340190565b7f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600b820152601f0190565b7f6e6f64652e7265776172642e6e6574776f726b00000000000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601382015260270190565b7f6e6f64652e736d6f6f7468696e672e706f6f6c2e737461746500000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166019820152602d0190565b6000613797826135e5565b7f726f636b6574436c61696d4e6f64650000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600f840152505060230190565b7f6e6f6465732e696e6465780000000000000000000000000000000000000000008152600b0190565b7f6e6f64652e74696d657a6f6e652e6c6f636174696f6e00000000000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166016820152602a0190565b7f6e6f64652e617665726167652e6665652e6e756d657261746f72000000000000815260609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601a820152602e0190565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156139195783516001600160a01b0316835292840192918401916001016138f4565b50909695505050505050565b60208082528251828201819052600091906040908185019080840286018301878501865b838110156139a8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08984030185528151805187855261398b8886018261359a565b918901519489019490945294870194925090860190600101613949565b509098975050505050505050565b901515815260200190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b600060208252610461602083018461359a565b60208082526013908201527f416c726561647920696e697469616c6973656400000000000000000000000000604082015260600190565b6020808252602b908201527f536d6f6f7468696e6720706f6f6c20726567697374726174696f6e732061726560408201527f206e6f7420616374697665000000000000000000000000000000000000000000606082015260800190565b60208082526035908201527f526f636b657420506f6f6c206e6f646520726567697374726174696f6e73206160408201527f72652063757272656e746c792064697361626c65640000000000000000000000606082015260800190565b6020808252818101527f5468652074696d657a6f6e65206c6f636174696f6e20697320696e76616c6964604082015260600190565b6020808252602f908201527f4e6f7420656e6f7567682074696d6520686173207061737365642073696e636560408201527f206368616e67696e672073746174650000000000000000000000000000000000606082015260800190565b60208082526016908201527f4e6574776f726b206973206e6f7420656e61626c656400000000000000000000604082015260600190565b60208082526044908201527f4f6e6c7920612074782066726f6d2061206e6f6465277320776974686472617760408201527f616c20616464726573732063616e206368616e676520726577617264206e657460608201527f776f726b00000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526014908201527f496e76616c6964207374617465206368616e6765000000000000000000000000604082015260600190565b600060208252613c8a602083018451613594565b602083015160408301526040830151610280806060850152613cb06102a085018361359a565b91506060850151613cc46080860182613594565b506080850151613cd760a0860182613587565b5060a085015160c08581019190915285015160e08086019190915285015161010080860191909152850151610120808601919091528501516101408086019190915285015161016080860191909152850151610180808601919091528501516101a0808601919091528501516101c0808601919091528501516101e08086019190915285015161020080860191909152850151610220613d7981870183613587565b8601519050610240613d8d86820183613587565b8601519050610260613da186820183613594565b959095015193019290925250919050565b60ff91909116815260200190565b6001600160a01b0381168114613dd557600080fd5b50565b8015158114613dd557600080fdfe726f636b657444414f4e6f64655472757374656453657474696e677352657761726473a2646970667358221220b8aa619d1b92cb57fd4ffcb1da3484d0155e693d02194f7fcfe7c4912018b6bd64736f6c63430007060033

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.