Holesky Testnet

Contract

0x270d554bba63De8ea4C3212514aC53C5487bCD69

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Initialise Votin...24567292024-10-03 3:52:24134 days ago1727927544IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...24566842024-10-03 3:41:48134 days ago1727926908IN
0x270d554b...5487bCD69
0 ETH0.000630772
Initialise Votin...24502992024-10-02 4:42:36135 days ago1727844156IN
0x270d554b...5487bCD69
0 ETH0.000630772
Initialise Votin...24502992024-10-02 4:42:36135 days ago1727844156IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...24368732024-09-30 4:10:36137 days ago1727669436IN
0x270d554b...5487bCD69
0 ETH0.000544392
Initialise Votin...24361802024-09-30 1:42:12137 days ago1727660532IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...24284912024-09-28 22:00:12139 days ago1727560812IN
0x270d554b...5487bCD69
0 ETH0.000630772
Initialise Votin...23788622024-09-21 10:32:24146 days ago1726914744IN
0x270d554b...5487bCD69
0 ETH0.000630772
Initialise Votin...23342472024-09-14 14:00:12153 days ago1726322412IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...23320062024-09-14 5:35:24153 days ago1726292124IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...23239172024-09-12 23:44:36155 days ago1726184676IN
0x270d554b...5487bCD69
0 ETH0.000630772
Initialise Votin...23234182024-09-12 21:53:36155 days ago1726178016IN
0x270d554b...5487bCD69
0 ETH0.000544392
Initialise Votin...23178062024-09-12 1:13:36155 days ago1726103616IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...23108222024-09-10 23:20:12157 days ago1726010412IN
0x270d554b...5487bCD69
0 ETH0.000661582
Initialise Votin...23047732024-09-10 0:55:00157 days ago1725929700IN
0x270d554b...5487bCD69
0 ETH0.00065322
Initialise Votin...23047662024-09-10 0:53:24158 days ago1725929604IN
0x270d554b...5487bCD69
0 ETH0.00065322
Initialise Votin...23047662024-09-10 0:53:24158 days ago1725929604IN
0x270d554b...5487bCD69
0 ETH0.00065322
Initialise Votin...23042092024-09-09 22:50:24158 days ago1725922224IN
0x270d554b...5487bCD69
0 ETH0.000630782.0000228
Initialise Votin...23037762024-09-09 21:11:12158 days ago1725916272IN
0x270d554b...5487bCD69
0 ETH0.000630772
Initialise Votin...23000362024-09-09 7:22:00158 days ago1725866520IN
0x270d554b...5487bCD69
0 ETH0.000684012
Initialise Votin...22991352024-09-09 4:03:36158 days ago1725854616IN
0x270d554b...5487bCD69
0 ETH0.000546282.00694779
Initialise Votin...22919162024-09-08 1:45:00159 days ago1725759900IN
0x270d554b...5487bCD69
0 ETH0.000630772
Set Delegate22128442024-08-26 23:30:00172 days ago1724715000IN
0x270d554b...5487bCD69
0 ETH0.000087431
Initialise Votin...19660732024-07-20 14:04:48209 days ago1721484288IN
0x270d554b...5487bCD69
0 ETH0.00057522
Initialise Votin...19435732024-07-17 4:43:36212 days ago1721191416IN
0x270d554b...5487bCD69
0 ETH0.000661582
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:
RocketNetworkVoting

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 15000 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity Standard Json-Input format)

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

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

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

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

/// @notice Accounting for snapshotting of governance related values based on block numbers
contract RocketNetworkVoting is RocketBase, RocketNetworkVotingInterface {

    // Constants
    bytes32 immutable internal priceKey;

    // Events
    event DelegateSet(address nodeOperator, address delegate, uint256 time);

    constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) {
        version = 1;
        // Precompute keys
        priceKey = keccak256("network.prices.rpl");
    }

    /// @notice Unlocks a node operator's voting power (only required for node operators who registered before
    ///         governance structure was in place). Sets delegate to self.
    function initialiseVoting() onlyRegisteredNode(msg.sender) external override {
        _initialiseVoting(msg.sender);
    }

    /// @notice Unlocks a node operator's voting power (only required for node operators who registered before
    ///         governance structure was in place).
    /// @param _delegate The node operator's desired delegate for their voting power
    function initialiseVotingWithDelegate(address _delegate) onlyRegisteredNode(msg.sender) onlyRegisteredNode(_delegate) external override {
        _initialiseVoting(_delegate);
    }

    /// @dev Initialises the snapshot values for the caller to participate in the on-chain governance
    function _initialiseVoting(address _delegate) private {
        // Check if already registered
        require (!getBool(keccak256(abi.encodePacked("node.voting.enabled", msg.sender))), "Already registered");
        setBool(keccak256(abi.encodePacked("node.voting.enabled", msg.sender)), true);

        // Get contracts
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        RocketNodeStakingInterface rocketNodeStaking = RocketNodeStakingInterface(getContractAddress("rocketNodeStaking"));
        RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager"));

        bytes32 key;

        // ETH matched
        key = keccak256(abi.encodePacked("eth.matched.node.amount", msg.sender));
        rocketNetworkSnapshots.push(key, uint224(rocketNodeStaking.getNodeETHMatched(msg.sender)));

        // Active minipools
        key = keccak256(abi.encodePacked("minipools.active.count", msg.sender));
        rocketNetworkSnapshots.push(key, uint224(rocketMinipoolManager.getNodeActiveMinipoolCount(msg.sender)));

        // RPL staked
        key = keccak256(abi.encodePacked("rpl.staked.node.amount", msg.sender));
        rocketNetworkSnapshots.push(key, uint224(rocketNodeStaking.getNodeRPLStake(msg.sender)));

        // Set starting delegate to themself
        key = keccak256(abi.encodePacked("node.delegate", msg.sender));
        rocketNetworkSnapshots.push(key, uint224(uint160(_delegate)));
    }

    function getVotingInitialised(address _nodeAddress) external override view returns (bool) {
        return getBool(keccak256(abi.encodePacked("node.voting.enabled", _nodeAddress)));
    }

    /// @notice Returns the number of registered nodes at a given block
    /// @param _block Block number to query
    function getNodeCount(uint32 _block) external override view returns (uint256) {
        // Get contracts
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        bytes32 key = keccak256(abi.encodePacked("node.count"));
        return uint256(rocketNetworkSnapshots.lookupRecent(key, _block, 10));
    }

    /// @notice Returns the voting power of a given node operator at a specified block
    /// @param _nodeAddress Address of the node operator
    /// @param _block Block number to query
    function getVotingPower(address _nodeAddress, uint32 _block) external override view returns (uint256) {
        // Validate block number
        require(_block <= block.number, "Block must be in the past");

        // Check if the node operator has enabled voting
        if (!getBool(keccak256(abi.encodePacked("node.voting.enabled", _nodeAddress)))) {
            return 0;
        }

        // Get contracts
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        RocketDAOProtocolSettingsMinipoolInterface rocketDAOProtocolSettingsMinipool = RocketDAOProtocolSettingsMinipoolInterface(getContractAddress("rocketDAOProtocolSettingsMinipool"));

        // Setup
        bytes32 key;

        // Get ETH matched
        key = keccak256(abi.encodePacked("eth.matched.node.amount", _nodeAddress));
        uint256 ethMatched = uint256(rocketNetworkSnapshots.lookupRecent(key, _block, 5));

        // Get active minipools to calculate ETH provided
        key = keccak256(abi.encodePacked("minipools.active.count", _nodeAddress));
        uint256 activeMinipools = rocketNetworkSnapshots.lookupRecent(key, _block, 5);
        uint256 launchAmount = rocketDAOProtocolSettingsMinipool.getLaunchBalance();
        uint256 totalEthStaked = activeMinipools * launchAmount;
        uint256 ethProvided = totalEthStaked - ethMatched;

        // Get RPL price
        uint256 rplPrice = uint256(rocketNetworkSnapshots.lookupRecent(priceKey, _block, 14));

        // Get RPL staked by node operator
        key = keccak256(abi.encodePacked("rpl.staked.node.amount", _nodeAddress));
        uint256 rplStake = uint256(rocketNetworkSnapshots.lookupRecent(key, _block, 5));

        // Get RPL max stake percent
        key = keccak256(bytes("node.voting.power.stake.maximum"));
        uint256 maximumStakePercent = uint256(rocketNetworkSnapshots.lookupRecent(key, _block, 2));

        return calculateVotingPower(rplStake, ethProvided, rplPrice, maximumStakePercent);
    }

    /// @dev Calculates and returns a node's voting power based on the given inputs
    function calculateVotingPower(uint256 _rplStake, uint256 _providedETH, uint256 _rplPrice, uint256 _maxStakePercent) internal view returns (uint256) {
        // Get contracts
        uint256 maximumStake = _providedETH * _maxStakePercent / _rplPrice;
        if (_rplStake > maximumStake) {
            _rplStake = maximumStake;
        }
        // Return the calculated voting power as the square root of clamped RPL stake
        return Math.sqrt(_rplStake * calcBase);
    }

    function setDelegate(address _newDelegate) external override onlyRegisteredNode(msg.sender) onlyRegisteredNode(_newDelegate) {
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        bytes32 key = keccak256(abi.encodePacked("node.delegate", msg.sender));
        rocketNetworkSnapshots.push(key, uint224(uint160(_newDelegate)));
        emit DelegateSet(msg.sender, _newDelegate, block.timestamp);
    }

    function getDelegate(address _nodeAddress, uint32 _block) external override view returns (address) {
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        bytes32 key = keccak256(abi.encodePacked("node.delegate", _nodeAddress));
        return address(uint160(rocketNetworkSnapshots.lookupRecent(key, _block, 10)));
    }

    function getCurrentDelegate(address _nodeAddress) external override view returns (address) {
        RocketNetworkSnapshotsInterface rocketNetworkSnapshots = RocketNetworkSnapshotsInterface(getContractAddress("rocketNetworkSnapshots"));
        bytes32 key = keccak256(abi.encodePacked("node.delegate", _nodeAddress));
        return address(uint160(rocketNetworkSnapshots.latestValue(key)));
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity >0.5.0 <0.9.0;

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

interface RocketStorageInterface {

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

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

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

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

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

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

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

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

abstract contract RocketBase {

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

    // Version of the contract
    uint8 public version;

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


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

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

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

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

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

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

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




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

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


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


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


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

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



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

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

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

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

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

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

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

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

struct Checkpoint224 {
    uint32 _block;
    uint224 _value;
}

/// @notice Accounting for snapshotting of values based on block numbers
interface RocketNetworkSnapshotsInterface {
    function push(bytes32 _key, uint224 _value) external;
    function length(bytes32 _key) external view returns (uint256);
    function latest(bytes32 _key) external view returns (bool, uint32, uint224);
    function latestBlock(bytes32 _key) external view returns (uint32);
    function latestValue(bytes32 _key) external view returns (uint224);
    function lookup(bytes32 _key, uint32 _block) external view returns (uint224);
    function lookupRecent(bytes32 _key, uint32 _block, uint256 _recency) external view returns (uint224);
}

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

pragma solidity >0.5.0 <0.9.0;

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

// Represents the type of deposits required by a minipool

enum MinipoolDeposit {
    None,       // Marks an invalid deposit type
    Full,       // The minipool requires 32 ETH from the node operator, 16 ETH of which will be refinanced from user deposits
    Half,       // The minipool required 16 ETH from the node operator to be matched with 16 ETH from user deposits
    Empty,      // The minipool requires 0 ETH from the node operator to be matched with 32 ETH from user deposits (trusted nodes only)
    Variable    // Indicates this minipool is of the new generation that supports a variable deposit amount
}

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

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

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

interface RocketNodeStakingInterface {
    function getTotalRPLStake() external view returns (uint256);
    function getNodeRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeETHMatched(address _nodeAddress) external view returns (uint256);
    function getNodeETHProvided(address _nodeAddress) external view returns (uint256);
    function getNodeETHCollateralisationRatio(address _nodeAddress) external view returns (uint256);
    function getNodeRPLStakedTime(address _nodeAddress) external view returns (uint256);
    function getNodeEffectiveRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMinimumRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeMaximumRPLStake(address _nodeAddress) external view returns (uint256);
    function getNodeETHMatchedLimit(address _nodeAddress) external view returns (uint256);
    function getRPLLockingAllowed(address _nodeAddress) external view returns (bool);
    function stakeRPL(uint256 _amount) external;
    function stakeRPLFor(address _nodeAddress, uint256 _amount) external;
    function setRPLLockingAllowed(address _nodeAddress, bool _allowed) external;
    function setStakeRPLForAllowed(address _caller, bool _allowed) external;
    function setStakeRPLForAllowed(address _nodeAddress, address _caller, bool _allowed) external;
    function getNodeRPLLocked(address _nodeAddress) external view returns (uint256);
    function lockRPL(address _nodeAddress, uint256 _amount) external;
    function unlockRPL(address _nodeAddress, uint256 _amount) external;
    function transferRPL(address _from, address _to, uint256 _amount) external;
    function withdrawRPL(uint256 _amount) external;
    function withdrawRPL(address _nodeAddress, uint256 _amount) external;
    function slashRPL(address _nodeAddress, uint256 _ethSlashAmount) external;
}

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only
interface RocketNetworkPricesInterface {
    function getPricesBlock() external view returns (uint256);
    function getRPLPrice() external view returns (uint256);
    function submitPrices(uint256 _block, uint256 _slotTimestamp, uint256 _rplPrice) external;
    function executeUpdatePrices(uint256 _block, uint256 _slotTimestamp, uint256 _rplPrice) external;
}

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

pragma solidity >0.5.0 <0.9.0;

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

// Represents a minipool's status within the network

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

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

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

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

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

pragma solidity >0.5.0 <0.9.0;
pragma abicoder v2;

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

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

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

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

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

interface RocketNetworkVotingInterface {
    function initialiseVoting() external;
    function initialiseVotingWithDelegate(address _delegate) external;
    function getVotingInitialised(address _nodeAddress) external view returns (bool);
    function getNodeCount(uint32 _block) external view returns (uint256);
    function getVotingPower(address _nodeAddress, uint32 _block) external view returns (uint256);
    function setDelegate(address _newDelegate) external;
    function getDelegate(address _nodeAddress, uint32 _block) external view returns (address);
    function getCurrentDelegate(address _nodeAddress) external view returns (address);
}

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

pragma solidity >0.5.0 <0.9.0;

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

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

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

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

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

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

interface RocketNodeManagerInterface {

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

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

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

Contract ABI

[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"nodeOperator","type":"address"},{"indexed":false,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"DelegateSet","type":"event"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getCurrentDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint32","name":"_block","type":"uint32"}],"name":"getDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_block","type":"uint32"}],"name":"getNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getVotingInitialised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint32","name":"_block","type":"uint32"}],"name":"getVotingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialiseVoting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"initialiseVotingWithDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newDelegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

60a060405260008054610100600160a81b031916905534801561002157600080fd5b50604051620021d8380380620021d88339810160408190526100429161009a565b6000805460ff196001600160a01b0390931661010002929092166001600160a81b03199092169190911760011790557f25a22f579c19c441c6276bbd381ad43715a7c75c8781f5ee499cba2bb59cd23b6080526100ca565b6000602082840312156100ac57600080fd5b81516001600160a01b03811681146100c357600080fd5b9392505050565b6080516120f2620000e66000396000610b2d01526120f26000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80636f2d56691161007657806387f78dc61161005b57806387f78dc6146101655780638e95df9014610178578063ca5eb5e11461018b57600080fd5b80636f2d56691461013a578063856e7b441461014257600080fd5b806328c70de0146100a857806354fd4d50146100e557806366bf3ffb146101045780636ba113ce14610125575b600080fd5b6100bb6100b6366004611e7d565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6000546100f29060ff1681565b60405160ff90911681526020016100dc565b610117610112366004611eb2565b6102ef565b6040519081526020016100dc565b610138610133366004611ecd565b610447565b005b6101386105e4565b610155610150366004611ecd565b6106a9565b60405190151581526020016100dc565b610117610173366004611e7d565b6106fa565b6100bb610186366004611ecd565b610e4c565b610138610199366004611ecd565b610f87565b6000806101df6040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b6040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606087901b16602d82015290915060009060410160408051808303601f190181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff86166024830152600a6044830152915073ffffffffffffffffffffffffffffffffffffffff83169063b5a352a890606401602060405180830381865afa1580156102c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e49190611eea565b925050505b92915050565b6000806103306040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b90506000604051602001610367907f6e6f64652e636f756e74000000000000000000000000000000000000000000008152600a0190565b60408051808303601f190181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff86166024830152600a6044830152915073ffffffffffffffffffffffffffffffffffffffff83169063b5a352a890606401602060405180830381865afa1580156103fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104219190611eea565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16949350505050565b336104b58160405160200161049a91907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b6040516020818303038152906040528051906020012061132e565b610520576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606084901b16602b820152829061057090603f0161049a565b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b6105df836113c6565b505050565b336106378160405160200161049a91907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b61069d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b6106a6336113c6565b50565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff19606083901b1660338201526000906102e99060470161049a565b6000438263ffffffff16111561076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f426c6f636b206d75737420626520696e207468652070617374000000000000006044820152606401610517565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff19606085901b1660338201526107ba9060470161049a565b6107c6575060006102e9565b60006108066040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b9050600061082b60405180606001604052806021815260200161209c6021913961127d565b6040517f6574682e6d6174636865642e6e6f64652e616d6f756e7400000000000000000060208201526bffffffffffffffffffffffff19606088901b166037820152909150600090604b0160408051601f198184030181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff8716602483015260056044830152915060009073ffffffffffffffffffffffffffffffffffffffff85169063b5a352a890606401602060405180830381865afa15801561090f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109339190611eea565b6040517f6d696e69706f6f6c732e6163746976652e636f756e740000000000000000000060208201526bffffffffffffffffffffffff1960608a901b1660368201527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff919091169150604a0160408051601f198184030181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff8816602483015260056044830152925060009073ffffffffffffffffffffffffffffffffffffffff86169063b5a352a890606401602060405180830381865afa158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190611eea565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae99190611f28565b90506000610af78284611f70565b90506000610b058583611f87565b6040517fb5a352a80000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015263ffffffff8c166024820152600e604482015290915060009073ffffffffffffffffffffffffffffffffffffffff8a169063b5a352a890606401602060405180830381865afa158015610ba8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcc9190611eea565b6040517f72706c2e7374616b65642e6e6f64652e616d6f756e740000000000000000000060208201526bffffffffffffffffffffffff1960608f901b1660368201527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff919091169150604a0160408051601f198184030181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff8d16602483015260056044830152975060009073ffffffffffffffffffffffffffffffffffffffff8b169063b5a352a890606401602060405180830381865afa158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf19190611eea565b604080518082018252601f81527f6e6f64652e766f74696e672e706f7765722e7374616b652e6d6178696d756d00602090910152517fb5a352a80000000000000000000000000000000000000000000000000000000081527f1b6028195e85a43527189139611db98fd210d645ea6839e6c06effd45b5934a96004820181905263ffffffff8f1660248301526002604483015299507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff91909116915060009073ffffffffffffffffffffffffffffffffffffffff8c169063b5a352a890606401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e9190611eea565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169050610e3a82858584611b33565b9e9d5050505050505050505050505050565b600080610e8d6040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b6040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606086901b16602d82015290915060009060410160408051808303601f190181529082905280516020909101207f6838444b00000000000000000000000000000000000000000000000000000000825260048201819052915073ffffffffffffffffffffffffffffffffffffffff831690636838444b90602401602060405180830381865afa158015610f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7f9190611eea565b949350505050565b33610fda8160405160200161049a91907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606084901b16602b820152829061109090603f0161049a565b6110f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b60006111366040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b6040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602d82015290915060009060410160408051808303601f190181529082905280516020909101207f5ba596490000000000000000000000000000000000000000000000000000000082526004820181905273ffffffffffffffffffffffffffffffffffffffff8781166024840152909250831690635ba5964990604401600060405180830381600087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b50506040805133815273ffffffffffffffffffffffffffffffffffffffff89166020820152428183015290517fd15a2994a2be5b325d8cf542ec472b0d5ad99afd2a4ad83fccf716de4e4c28169350908190036060019150a15050505050565b6000806112af836040516020016112949190611f9a565b60405160208183030381529060405280519060200120611b7d565b905073ffffffffffffffffffffffffffffffffffffffff81166102e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e6400000000000000000000000000006044820152606401610517565b600080546040517f7ae1cfca0000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff1690637ae1cfca90602401602060405180830381865afa1580156113a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e99190611ff2565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff193360601b1660338201526114139060470161049a565b1561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f416c7265616479207265676973746572656400000000000000000000000000006044820152606401610517565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff193360601b1660338201526114df90604701604051602081830303815290604052805190602001206001611c15565b600061151f6040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b905060006115616040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525061127d565b905060006115a36040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061127d565b6040517f6574682e6d6174636865642e6e6f64652e616d6f756e7400000000000000000060208201526bffffffffffffffffffffffff193360601b166037820152909150600090604b0160408051601f198184030181529082905280516020909101207fa493e6a2000000000000000000000000000000000000000000000000000000008252336004830152915073ffffffffffffffffffffffffffffffffffffffff80861691635ba596499184919087169063a493e6a290602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190611f28565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b15801561171457600080fd5b505af1158015611728573d6000803e3d6000fd5b50506040517f6d696e69706f6f6c732e6163746976652e636f756e740000000000000000000060208201526bffffffffffffffffffffffff193360601b166036820152604a0191506117779050565b60408051601f198184030181529082905280516020909101207f1844ec01000000000000000000000000000000000000000000000000000000008252336004830152915073ffffffffffffffffffffffffffffffffffffffff80861691635ba5964991849190861690631844ec0190602401602060405180830381865afa158015611806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182a9190611f28565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b15801561189e57600080fd5b505af11580156118b2573d6000803e3d6000fd5b50506040517f72706c2e7374616b65642e6e6f64652e616d6f756e740000000000000000000060208201526bffffffffffffffffffffffff193360601b166036820152604a0191506119019050565b60408051601f198184030181529082905280516020909101207f9961cee4000000000000000000000000000000000000000000000000000000008252336004830152915073ffffffffffffffffffffffffffffffffffffffff80861691635ba5964991849190871690639961cee490602401602060405180830381865afa158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b49190611f28565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b158015611a2857600080fd5b505af1158015611a3c573d6000803e3d6000fd5b50506040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602d8201526041019150611a8b9050565b60408051808303601f190181529082905280516020909101207f5ba596490000000000000000000000000000000000000000000000000000000082526004820181905273ffffffffffffffffffffffffffffffffffffffff8781166024840152909250851690635ba5964990604401600060405180830381600087803b158015611b1457600080fd5b505af1158015611b28573d6000803e3d6000fd5b505050505050505050565b60008083611b418487611f70565b611b4b9190612043565b905080861115611b59578095505b611b73611b6e670de0b6b3a764000088611f70565b611ca9565b9695505050505050565b600080546040517f21f8a7210000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff16906321f8a72190602401602060405180830381865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e9919061207e565b6000546040517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101849052821515602482015261010090910473ffffffffffffffffffffffffffffffffffffffff169063abfdcced90604401600060405180830381600087803b158015611c8d57600080fd5b505af1158015611ca1573d6000803e3d6000fd5b505050505050565b600081600003611cbb57506000919050565b60006001611cc884611d98565b901c6001901b90506001818481611ce157611ce1612014565b048201901c90506001818481611cf957611cf9612014565b048201901c90506001818481611d1157611d11612014565b048201901c90506001818481611d2957611d29612014565b048201901c90506001818481611d4157611d41612014565b048201901c90506001818481611d5957611d59612014565b048201901c90506001818481611d7157611d71612014565b048201901c9050611d9181828581611d8b57611d8b612014565b04611e2c565b9392505050565b600080608083901c15611dad57608092831c92015b604083901c15611dbf57604092831c92015b602083901c15611dd157602092831c92015b601083901c15611de357601092831c92015b600883901c15611df557600892831c92015b600483901c15611e0757600492831c92015b600283901c15611e1957600292831c92015b600183901c156102e95760010192915050565b6000818310611e3b5781611d91565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106a657600080fd5b803563ffffffff81168114611e7857600080fd5b919050565b60008060408385031215611e9057600080fd5b8235611e9b81611e42565b9150611ea960208401611e64565b90509250929050565b600060208284031215611ec457600080fd5b611d9182611e64565b600060208284031215611edf57600080fd5b8135611d9181611e42565b600060208284031215611efc57600080fd5b81517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114611d9157600080fd5b600060208284031215611f3a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176102e9576102e9611f41565b818103818111156102e9576102e9611f41565b7f636f6e74726163742e616464726573730000000000000000000000000000000081526000825160005b81811015611fe15760208186018101516010868401015201611fc4565b506000920160100191825250919050565b60006020828403121561200457600080fd5b81518015158114611d9157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612079577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561209057600080fd5b8151611d9181611e4256fe726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6ca2646970667358221220dc0d46c275a2767dc1332dd93426fd36964b62cf848af7b209989aa73621c10364736f6c63430008120033000000000000000000000000594fb75d3dc2dfa0150ad03f99f97817747dd4e1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80636f2d56691161007657806387f78dc61161005b57806387f78dc6146101655780638e95df9014610178578063ca5eb5e11461018b57600080fd5b80636f2d56691461013a578063856e7b441461014257600080fd5b806328c70de0146100a857806354fd4d50146100e557806366bf3ffb146101045780636ba113ce14610125575b600080fd5b6100bb6100b6366004611e7d565b61019e565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6000546100f29060ff1681565b60405160ff90911681526020016100dc565b610117610112366004611eb2565b6102ef565b6040519081526020016100dc565b610138610133366004611ecd565b610447565b005b6101386105e4565b610155610150366004611ecd565b6106a9565b60405190151581526020016100dc565b610117610173366004611e7d565b6106fa565b6100bb610186366004611ecd565b610e4c565b610138610199366004611ecd565b610f87565b6000806101df6040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b6040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606087901b16602d82015290915060009060410160408051808303601f190181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff86166024830152600a6044830152915073ffffffffffffffffffffffffffffffffffffffff83169063b5a352a890606401602060405180830381865afa1580156102c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e49190611eea565b925050505b92915050565b6000806103306040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b90506000604051602001610367907f6e6f64652e636f756e74000000000000000000000000000000000000000000008152600a0190565b60408051808303601f190181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff86166024830152600a6044830152915073ffffffffffffffffffffffffffffffffffffffff83169063b5a352a890606401602060405180830381865afa1580156103fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104219190611eea565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16949350505050565b336104b58160405160200161049a91907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b6040516020818303038152906040528051906020012061132e565b610520576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f6465000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606084901b16602b820152829061057090603f0161049a565b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b6105df836113c6565b505050565b336106378160405160200161049a91907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b61069d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b6106a6336113c6565b50565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff19606083901b1660338201526000906102e99060470161049a565b6000438263ffffffff16111561076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f426c6f636b206d75737420626520696e207468652070617374000000000000006044820152606401610517565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff19606085901b1660338201526107ba9060470161049a565b6107c6575060006102e9565b60006108066040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b9050600061082b60405180606001604052806021815260200161209c6021913961127d565b6040517f6574682e6d6174636865642e6e6f64652e616d6f756e7400000000000000000060208201526bffffffffffffffffffffffff19606088901b166037820152909150600090604b0160408051601f198184030181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff8716602483015260056044830152915060009073ffffffffffffffffffffffffffffffffffffffff85169063b5a352a890606401602060405180830381865afa15801561090f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109339190611eea565b6040517f6d696e69706f6f6c732e6163746976652e636f756e740000000000000000000060208201526bffffffffffffffffffffffff1960608a901b1660368201527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff919091169150604a0160408051601f198184030181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff8816602483015260056044830152925060009073ffffffffffffffffffffffffffffffffffffffff86169063b5a352a890606401602060405180830381865afa158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190611eea565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff166308e50d386040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae99190611f28565b90506000610af78284611f70565b90506000610b058583611f87565b6040517fb5a352a80000000000000000000000000000000000000000000000000000000081527f25a22f579c19c441c6276bbd381ad43715a7c75c8781f5ee499cba2bb59cd23b600482015263ffffffff8c166024820152600e604482015290915060009073ffffffffffffffffffffffffffffffffffffffff8a169063b5a352a890606401602060405180830381865afa158015610ba8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcc9190611eea565b6040517f72706c2e7374616b65642e6e6f64652e616d6f756e740000000000000000000060208201526bffffffffffffffffffffffff1960608f901b1660368201527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff919091169150604a0160408051601f198184030181529082905280516020909101207fb5a352a80000000000000000000000000000000000000000000000000000000082526004820181905263ffffffff8d16602483015260056044830152975060009073ffffffffffffffffffffffffffffffffffffffff8b169063b5a352a890606401602060405180830381865afa158015610ccd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf19190611eea565b604080518082018252601f81527f6e6f64652e766f74696e672e706f7765722e7374616b652e6d6178696d756d00602090910152517fb5a352a80000000000000000000000000000000000000000000000000000000081527f1b6028195e85a43527189139611db98fd210d645ea6839e6c06effd45b5934a96004820181905263ffffffff8f1660248301526002604483015299507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff91909116915060009073ffffffffffffffffffffffffffffffffffffffff8c169063b5a352a890606401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e9190611eea565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169050610e3a82858584611b33565b9e9d5050505050505050505050505050565b600080610e8d6040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b6040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606086901b16602d82015290915060009060410160408051808303601f190181529082905280516020909101207f6838444b00000000000000000000000000000000000000000000000000000000825260048201819052915073ffffffffffffffffffffffffffffffffffffffff831690636838444b90602401602060405180830381865afa158015610f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7f9190611eea565b949350505050565b33610fda8160405160200161049a91907f6e6f64652e657869737473000000000000000000000000000000000000000000815260609190911b6bffffffffffffffffffffffff1916600b820152601f0190565b611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b6040517f6e6f64652e65786973747300000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606084901b16602b820152829061109090603f0161049a565b6110f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152606401610517565b60006111366040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b6040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602d82015290915060009060410160408051808303601f190181529082905280516020909101207f5ba596490000000000000000000000000000000000000000000000000000000082526004820181905273ffffffffffffffffffffffffffffffffffffffff8781166024840152909250831690635ba5964990604401600060405180830381600087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b50506040805133815273ffffffffffffffffffffffffffffffffffffffff89166020820152428183015290517fd15a2994a2be5b325d8cf542ec472b0d5ad99afd2a4ad83fccf716de4e4c28169350908190036060019150a15050505050565b6000806112af836040516020016112949190611f9a565b60405160208183030381529060405280519060200120611b7d565b905073ffffffffffffffffffffffffffffffffffffffff81166102e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e6400000000000000000000000000006044820152606401610517565b600080546040517f7ae1cfca0000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff1690637ae1cfca90602401602060405180830381865afa1580156113a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e99190611ff2565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff193360601b1660338201526114139060470161049a565b1561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f416c7265616479207265676973746572656400000000000000000000000000006044820152606401610517565b6040517f6e6f64652e766f74696e672e656e61626c65640000000000000000000000000060208201526bffffffffffffffffffffffff193360601b1660338201526114df90604701604051602081830303815290604052805190602001206001611c15565b600061151f6040518060400160405280601681526020017f726f636b65744e6574776f726b536e617073686f74730000000000000000000081525061127d565b905060006115616040518060400160405280601181526020017f726f636b65744e6f64655374616b696e6700000000000000000000000000000081525061127d565b905060006115a36040518060400160405280601581526020017f726f636b65744d696e69706f6f6c4d616e61676572000000000000000000000081525061127d565b6040517f6574682e6d6174636865642e6e6f64652e616d6f756e7400000000000000000060208201526bffffffffffffffffffffffff193360601b166037820152909150600090604b0160408051601f198184030181529082905280516020909101207fa493e6a2000000000000000000000000000000000000000000000000000000008252336004830152915073ffffffffffffffffffffffffffffffffffffffff80861691635ba596499184919087169063a493e6a290602401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190611f28565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b15801561171457600080fd5b505af1158015611728573d6000803e3d6000fd5b50506040517f6d696e69706f6f6c732e6163746976652e636f756e740000000000000000000060208201526bffffffffffffffffffffffff193360601b166036820152604a0191506117779050565b60408051601f198184030181529082905280516020909101207f1844ec01000000000000000000000000000000000000000000000000000000008252336004830152915073ffffffffffffffffffffffffffffffffffffffff80861691635ba5964991849190861690631844ec0190602401602060405180830381865afa158015611806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182a9190611f28565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b15801561189e57600080fd5b505af11580156118b2573d6000803e3d6000fd5b50506040517f72706c2e7374616b65642e6e6f64652e616d6f756e740000000000000000000060208201526bffffffffffffffffffffffff193360601b166036820152604a0191506119019050565b60408051601f198184030181529082905280516020909101207f9961cee4000000000000000000000000000000000000000000000000000000008252336004830152915073ffffffffffffffffffffffffffffffffffffffff80861691635ba5964991849190871690639961cee490602401602060405180830381865afa158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b49190611f28565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092527bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b158015611a2857600080fd5b505af1158015611a3c573d6000803e3d6000fd5b50506040517f6e6f64652e64656c65676174650000000000000000000000000000000000000060208201526bffffffffffffffffffffffff193360601b16602d8201526041019150611a8b9050565b60408051808303601f190181529082905280516020909101207f5ba596490000000000000000000000000000000000000000000000000000000082526004820181905273ffffffffffffffffffffffffffffffffffffffff8781166024840152909250851690635ba5964990604401600060405180830381600087803b158015611b1457600080fd5b505af1158015611b28573d6000803e3d6000fd5b505050505050505050565b60008083611b418487611f70565b611b4b9190612043565b905080861115611b59578095505b611b73611b6e670de0b6b3a764000088611f70565b611ca9565b9695505050505050565b600080546040517f21f8a7210000000000000000000000000000000000000000000000000000000081526004810184905261010090910473ffffffffffffffffffffffffffffffffffffffff16906321f8a72190602401602060405180830381865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e9919061207e565b6000546040517fabfdcced00000000000000000000000000000000000000000000000000000000815260048101849052821515602482015261010090910473ffffffffffffffffffffffffffffffffffffffff169063abfdcced90604401600060405180830381600087803b158015611c8d57600080fd5b505af1158015611ca1573d6000803e3d6000fd5b505050505050565b600081600003611cbb57506000919050565b60006001611cc884611d98565b901c6001901b90506001818481611ce157611ce1612014565b048201901c90506001818481611cf957611cf9612014565b048201901c90506001818481611d1157611d11612014565b048201901c90506001818481611d2957611d29612014565b048201901c90506001818481611d4157611d41612014565b048201901c90506001818481611d5957611d59612014565b048201901c90506001818481611d7157611d71612014565b048201901c9050611d9181828581611d8b57611d8b612014565b04611e2c565b9392505050565b600080608083901c15611dad57608092831c92015b604083901c15611dbf57604092831c92015b602083901c15611dd157602092831c92015b601083901c15611de357601092831c92015b600883901c15611df557600892831c92015b600483901c15611e0757600492831c92015b600283901c15611e1957600292831c92015b600183901c156102e95760010192915050565b6000818310611e3b5781611d91565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106a657600080fd5b803563ffffffff81168114611e7857600080fd5b919050565b60008060408385031215611e9057600080fd5b8235611e9b81611e42565b9150611ea960208401611e64565b90509250929050565b600060208284031215611ec457600080fd5b611d9182611e64565b600060208284031215611edf57600080fd5b8135611d9181611e42565b600060208284031215611efc57600080fd5b81517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114611d9157600080fd5b600060208284031215611f3a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176102e9576102e9611f41565b818103818111156102e9576102e9611f41565b7f636f6e74726163742e616464726573730000000000000000000000000000000081526000825160005b81811015611fe15760208186018101516010868401015201611fc4565b506000920160100191825250919050565b60006020828403121561200457600080fd5b81518015158114611d9157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612079577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561209057600080fd5b8151611d9181611e4256fe726f636b657444414f50726f746f636f6c53657474696e67734d696e69706f6f6ca2646970667358221220dc0d46c275a2767dc1332dd93426fd36964b62cf848af7b209989aa73621c10364736f6c63430008120033

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

000000000000000000000000594Fb75D3dc2DFa0150Ad03F99F97817747dd4E1

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000594Fb75D3dc2DFa0150Ad03F99F97817747dd4E1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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.