ETH Price: $1,949.11 (-0.71%)
Gas: 0.03 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit Multi245661372026-03-02 0:18:5924 mins ago1772410739IN
0x6B13698c...3781D2D47
20 ETH0.005455362.03573771
Deposit Multi245656352026-03-01 22:38:232 hrs ago1772404703IN
0x6B13698c...3781D2D47
16 ETH0.00019080.076551
Deposit Multi245652992026-03-01 21:31:113 hrs ago1772400671IN
0x6B13698c...3781D2D47
8 ETH0.000137780.090436
Deposit Multi245641442026-03-01 17:39:597 hrs ago1772386799IN
0x6B13698c...3781D2D47
28 ETH0.000241510.0706553
Deposit Multi245631432026-03-01 14:18:5910 hrs ago1772374739IN
0x6B13698c...3781D2D47
8 ETH0.000202060.13171456
Deposit Multi245629902026-03-01 13:47:5910 hrs ago1772372879IN
0x6B13698c...3781D2D47
4 ETH0.000056730.06150373
Deposit Multi245617922026-03-01 9:47:2314 hrs ago1772358443IN
0x6B13698c...3781D2D47
28 ETH0.0001530.0429751
Deposit Multi245617812026-03-01 9:45:1114 hrs ago1772358311IN
0x6B13698c...3781D2D47
4 ETH0.000049760.04499864
Deposit Multi245614052026-03-01 8:29:3516 hrs ago1772353775IN
0x6B13698c...3781D2D47
4 ETH0.000045170.04341887
Deposit Multi245613522026-03-01 8:18:5916 hrs ago1772353139IN
0x6B13698c...3781D2D47
4 ETH0.000047120.042981
Deposit Multi245597392026-03-01 2:55:2321 hrs ago1772333723IN
0x6B13698c...3781D2D47
12 ETH0.002711281.54354271
Deposit Multi245595242026-03-01 2:12:1122 hrs ago1772331131IN
0x6B13698c...3781D2D47
24 ETH0.000994220.28796512
Deposit Multi245593602026-03-01 1:38:5923 hrs ago1772329139IN
0x6B13698c...3781D2D47
8 ETH0.000051950.046
Deposit Multi245587952026-02-28 23:45:3524 hrs ago1772322335IN
0x6B13698c...3781D2D47
0 ETH0.000080020.05142319
Deposit Eth For245587772026-02-28 23:41:5925 hrs ago1772322119IN
0x6B13698c...3781D2D47
8 ETH0.000011730.12732807
Deposit Multi245581372026-02-28 21:33:1127 hrs ago1772314391IN
0x6B13698c...3781D2D47
4 ETH0.000064170.05788047
Deposit Multi245579922026-02-28 21:03:5927 hrs ago1772312639IN
0x6B13698c...3781D2D47
8 ETH0.00010420.09137847
Deposit Multi245579392026-02-28 20:53:2327 hrs ago1772312003IN
0x6B13698c...3781D2D47
4 ETH0.001955582.14998508
Deposit Multi245574582026-02-28 19:16:4729 hrs ago1772306207IN
0x6B13698c...3781D2D47
32 ETH0.000394570.09764594
Deposit Multi245567172026-02-28 16:47:3531 hrs ago1772297255IN
0x6B13698c...3781D2D47
4 ETH0.001878222.06494114
Deposit Multi245562542026-02-28 15:13:5933 hrs ago1772291639IN
0x6B13698c...3781D2D47
4 ETH0.002301922.10048691
Deposit Multi245559312026-02-28 14:08:3534 hrs ago1772287715IN
0x6B13698c...3781D2D47
0 ETH0.000168390.14384468
Deposit Eth For245559252026-02-28 14:07:2334 hrs ago1772287643IN
0x6B13698c...3781D2D47
8 ETH0.000616256.68457442
Deposit Multi245554782026-02-28 12:37:2336 hrs ago1772282243IN
0x6B13698c...3781D2D47
16 ETH0.000112670.05245437
Deposit Multi245554712026-02-28 12:35:5936 hrs ago1772282159IN
0x6B13698c...3781D2D47
36 ETH0.000221570.05108248
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Node Deposit245661372026-03-02 0:18:5924 mins ago1772410739
0x6B13698c...3781D2D47
20 ETH
Node Deposit245656352026-03-01 22:38:232 hrs ago1772404703
0x6B13698c...3781D2D47
16 ETH
Node Deposit245652992026-03-01 21:31:113 hrs ago1772400671
0x6B13698c...3781D2D47
8 ETH
Node Deposit245641442026-03-01 17:39:597 hrs ago1772386799
0x6B13698c...3781D2D47
28 ETH
Node Deposit245631432026-03-01 14:18:5910 hrs ago1772374739
0x6B13698c...3781D2D47
8 ETH
Node Deposit245629902026-03-01 13:47:5910 hrs ago1772372879
0x6B13698c...3781D2D47
4 ETH
Node Deposit245617922026-03-01 9:47:2314 hrs ago1772358443
0x6B13698c...3781D2D47
28 ETH
Node Deposit245617812026-03-01 9:45:1114 hrs ago1772358311
0x6B13698c...3781D2D47
4 ETH
Node Deposit245614052026-03-01 8:29:3516 hrs ago1772353775
0x6B13698c...3781D2D47
4 ETH
Node Deposit245613522026-03-01 8:18:5916 hrs ago1772353139
0x6B13698c...3781D2D47
4 ETH
Node Deposit245597392026-03-01 2:55:2321 hrs ago1772333723
0x6B13698c...3781D2D47
12 ETH
Node Deposit245595242026-03-01 2:12:1122 hrs ago1772331131
0x6B13698c...3781D2D47
24 ETH
Node Deposit245593602026-03-01 1:38:5923 hrs ago1772329139
0x6B13698c...3781D2D47
8 ETH
Node Deposit245587952026-02-28 23:45:3524 hrs ago1772322335
0x6B13698c...3781D2D47
8 ETH
Receive Vault Wi...245587952026-02-28 23:45:3524 hrs ago1772322335
0x6B13698c...3781D2D47
8 ETH
Deposit Ether245587772026-02-28 23:41:5925 hrs ago1772322119
0x6B13698c...3781D2D47
8 ETH
Node Deposit245581372026-02-28 21:33:1127 hrs ago1772314391
0x6B13698c...3781D2D47
4 ETH
Node Deposit245579922026-02-28 21:03:5927 hrs ago1772312639
0x6B13698c...3781D2D47
8 ETH
Node Deposit245579392026-02-28 20:53:2327 hrs ago1772312003
0x6B13698c...3781D2D47
4 ETH
Node Deposit245574582026-02-28 19:16:4729 hrs ago1772306207
0x6B13698c...3781D2D47
32 ETH
Node Deposit245567172026-02-28 16:47:3531 hrs ago1772297255
0x6B13698c...3781D2D47
4 ETH
Node Deposit245562542026-02-28 15:13:5933 hrs ago1772291639
0x6B13698c...3781D2D47
4 ETH
Node Deposit245559312026-02-28 14:08:3534 hrs ago1772287715
0x6B13698c...3781D2D47
8 ETH
Receive Vault Wi...245559312026-02-28 14:08:3534 hrs ago1772287715
0x6B13698c...3781D2D47
8 ETH
Deposit Ether245559252026-02-28 14:07:2334 hrs ago1772287643
0x6B13698c...3781D2D47
8 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RocketNodeDeposit

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 15000 runs

Other Settings:
paris EvmVersion, GNU GPLv3 license
/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

import {RocketStorageInterface} from "../../interface/RocketStorageInterface.sol";
import {RocketVaultInterface} from "../../interface/RocketVaultInterface.sol";
import {RocketVaultWithdrawerInterface} from "../../interface/RocketVaultWithdrawerInterface.sol";
import {RocketDAOProtocolSettingsNodeInterface} from "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol";
import {RocketDepositPoolInterface} from "../../interface/deposit/RocketDepositPoolInterface.sol";
import {RocketMegapoolFactoryInterface} from "../../interface/megapool/RocketMegapoolFactoryInterface.sol";
import {RocketMegapoolInterface} from "../../interface/megapool/RocketMegapoolInterface.sol";
import {RocketMegapoolManagerInterface} from "../../interface/megapool/RocketMegapoolManagerInterface.sol";
import {RocketNodeDepositInterface} from "../../interface/node/RocketNodeDepositInterface.sol";
import {RocketBase} from "../RocketBase.sol";

/// @notice Entry point for node operators to perform deposits for the creation of new validators on the network
contract RocketNodeDeposit is RocketBase, RocketNodeDepositInterface, RocketVaultWithdrawerInterface {
    // Constants
    uint256 constant internal pubKeyLength = 48;
    uint256 constant internal signatureLength = 96;

    // Events
    event DepositReceived(address indexed from, uint256 amount, uint256 time);
    event MultiDepositReceived(address indexed from, uint256 numberOfValidators, uint256 totalBond, uint256 time);
    event DepositFor(address indexed nodeAddress, address indexed from, uint256 amount, uint256 time);
    event Withdrawal(address indexed nodeAddress, address indexed to, uint256 amount, uint256 time);

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

    /// @notice Accept incoming ETH from the deposit pool
    receive() external payable onlyLatestContract("rocketDepositPool", msg.sender) {}

    /// @dev Callback required to receive ETH withdrawal from the vault
    function receiveVaultWithdrawalETH() override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyLatestContract("rocketVault", msg.sender) {}

    /// @notice Returns the bond requirement for the given number of validators
    /// @param _numValidators The number of validator to calculate the bond requirement for
    function getBondRequirement(uint256 _numValidators) override public view returns (uint256) {
        if (_numValidators == 0) {
            return 0;
        }
        // Get contracts
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Calculate bond requirement (per RPIP-42)
        uint256[] memory baseBondArray = rocketDAOProtocolSettingsNode.getBaseBondArray();
        if (_numValidators - 1 < baseBondArray.length) {
            return baseBondArray[_numValidators - 1];
        }
        uint256 reducedBond = rocketDAOProtocolSettingsNode.getReducedBond();
        return baseBondArray[baseBondArray.length - 1] + (_numValidators - baseBondArray.length) * reducedBond;
    }

    /// @notice Returns a node operator's credit balance in ETH
    /// @param _nodeAddress Address of the node operator to query for
    function getNodeDepositCredit(address _nodeAddress) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.deposit.credit.balance", _nodeAddress)));
    }

    /// @notice Returns the current ETH balance for the given node operator
    /// @param _nodeAddress Address of the node operator to query for
    function getNodeEthBalance(address _nodeAddress) override public view returns (uint256) {
        return getUint(keccak256(abi.encodePacked("node.eth.balance", _nodeAddress)));
    }

    /// @notice Returns the sum of the credit balance of a given node operator and their balance
    /// @param _nodeAddress Address of the node operator to query for
    function getNodeCreditAndBalance(address _nodeAddress) override external view returns (uint256) {
        return getNodeDepositCredit(_nodeAddress) + getNodeEthBalance(_nodeAddress);
    }

    /// @notice Returns the sum of the amount of ETH credit currently usable by a given node operator and their balance
    /// @param _nodeAddress Address of the node operator to query for
    function getNodeUsableCreditAndBalance(address _nodeAddress) override external view returns (uint256) {
        return getNodeUsableCredit(_nodeAddress) + getNodeEthBalance(_nodeAddress);
    }

    /// @notice Returns the amount of ETH credit currently usable by a given node operator
    /// @param _nodeAddress Address of the node operator to query for
    function getNodeUsableCredit(address _nodeAddress) override public view returns (uint256) {
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        uint256 depositPoolBalance = rocketDepositPool.getBalance();
        uint256 usableCredit = getNodeDepositCredit(_nodeAddress);
        if (usableCredit > depositPoolBalance) {
            usableCredit = depositPoolBalance;
        }
        return usableCredit;
    }

    /// @dev Increases a node operators deposit credit balance
    /// @param _nodeAddress Address of the node operator to increase deposit balance for
    /// @param _amount Amount to increase deposit credit balance by
    function increaseDepositCreditBalance(address _nodeAddress, uint256 _amount) override external onlyLatestContract("rocketNodeDeposit", address(this)) {
        // Accept calls from registered minipools
        require(getBool(keccak256(abi.encodePacked("minipool.exists", msg.sender))), "Invalid or outdated network contract");
        // Increase credit balance
        addUint(keccak256(abi.encodePacked("node.deposit.credit.balance", _nodeAddress)), _amount);
    }

    /// @notice Deposits ETH for the given node operator
    /// @param _nodeAddress The address of the node operator to deposit ETH for
    function depositEthFor(address _nodeAddress) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(_nodeAddress) {
        // Send the ETH to vault
        uint256 amount = msg.value;
        RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
        rocketVault.depositEther{value: amount}();
        // Increment balance
        addUint(keccak256(abi.encodePacked("node.eth.balance", _nodeAddress)), amount);
        // Log it
        emit DepositFor(_nodeAddress, msg.sender, amount, block.timestamp);
    }

    /// @notice Withdraws ETH from a node operator's balance. Must be called from withdrawal address.
    /// @param _nodeAddress Address of the node operator to withdraw from
    /// @param _amount Amount of ETH to withdraw
    function withdrawEth(address _nodeAddress, uint256 _amount) external onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(_nodeAddress) {
        // Check valid caller
        address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress);
        require(msg.sender == withdrawalAddress, "Only withdrawal address can withdraw ETH");
        // Check balance and update
        uint256 balance = getNodeEthBalance(_nodeAddress);
        require(balance >= _amount, "Insufficient balance");
        setUint(keccak256(abi.encodePacked("node.eth.balance", _nodeAddress)), balance - _amount);
        // Withdraw the funds
        RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
        rocketVault.withdrawEther(_amount);
        // Send funds to withdrawalAddress
        (bool success,) = withdrawalAddress.call{value: _amount}("");
        require(success, "Failed to withdraw ETH");
        // Log it
        emit Withdrawal(_nodeAddress, withdrawalAddress, _amount, block.timestamp);
    }

    /// @notice Accept a node deposit and create a new validator under the node. Only accepts calls from registered nodes
    /// @param _bondAmount The amount of capital the node operator wants to put up as his bond
    /// @param _useExpressTicket If the express queue should be used 
    /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate
    /// @param _validatorSignature Signature from the validator over the deposit data
    /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake)
    function deposit(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        // Check amount
        require(msg.value == _bondAmount, "Invalid value");
        // Process the deposit
        _deposit(_bondAmount, _useExpressTicket, _validatorPubkey, _validatorSignature, _depositDataRoot, msg.value);
    }

    /// @notice Accept a node deposit and create a new validator under the node. Only accepts calls from registered nodes
    /// @param _bondAmount The amount of capital the node operator wants to put up as his bond
    /// @param _useExpressTicket If the express queue should be used 
    /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate
    /// @param _validatorSignature Signature from the validator over the deposit data
    /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake)
    function depositWithCredit(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        // Process the deposit
        uint256 balanceToUse = _useCreditOrBalanceIfRequired(_bondAmount);
        _deposit(_bondAmount, _useExpressTicket, _validatorPubkey, _validatorSignature, _depositDataRoot, msg.value + balanceToUse);
    }

    /// @notice Processes multiple node deposits in one call
    /// @param _deposits Array of deposits to process
    function depositMulti(NodeDeposit[] calldata _deposits) override external payable onlyLatestContract("rocketNodeDeposit", address(this)) onlyRegisteredNode(msg.sender) {
        // Check pre-conditions
        require(_deposits.length > 0, "Must perform at least 1 deposit");
        _checkDepositsEnabled();
        // Get or deploy a megapool for the caller
        RocketMegapoolFactoryInterface rocketMegapoolFactory = RocketMegapoolFactoryInterface(getContractAddress("rocketMegapoolFactory"));
        RocketMegapoolInterface megapool = RocketMegapoolInterface(rocketMegapoolFactory.getOrDeployContract(msg.sender));
        RocketMegapoolManagerInterface rocketMegapoolManager = RocketMegapoolManagerInterface(getContractAddress("rocketMegapoolManager"));
        // Iterate deposits and execute
        uint256 totalBond = 0;
        for (uint256 i = 0; i < _deposits.length; ++i) {
            NodeDeposit calldata deposit = _deposits[i];
            // Validate arguments
            _validateBytes(deposit.validatorPubkey, pubKeyLength);
            _validateBytes(deposit.validatorSignature, signatureLength);
            // Request a new validator from the megapool
            rocketMegapoolManager.addValidator(address(megapool), megapool.getValidatorCount(), deposit.validatorPubkey);
            megapool.newValidator(deposit.bondAmount, deposit.useExpressTicket, deposit.validatorPubkey, deposit.validatorSignature, deposit.depositDataRoot);
            // Sum bond total
            totalBond += deposit.bondAmount;
        }
        // Check if node accidentally sent too high msg.value
        require(msg.value <= totalBond, "Excess bond value supplied");
        // Check if node sent full bond amount of if we need to use credit/balance
        uint256 balanceToUse = 0;
        if (msg.value < totalBond) {
            balanceToUse = _useCreditOrBalanceIfRequired(totalBond);
        }
        // Emit deposit received event
        emit MultiDepositReceived(msg.sender, _deposits.length, totalBond, block.timestamp);
        // Send node operator's bond to the deposit pool
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        rocketDepositPool.nodeDeposit{value: msg.value + balanceToUse}(totalBond);
        // Attempt to assign 1 minipool/megapool for each deposit
        rocketDepositPool.maybeAssignDeposits(_deposits.length);
    }

    /// @dev Internal logic to process a deposit
    /// @param _bondAmount The amount of capital the node operator wants to put up as his bond
    /// @param _useExpressTicket If the express queue should be used
    /// @param _validatorPubkey Pubkey of the validator the node operator wishes to migrate
    /// @param _validatorSignature Signature from the validator over the deposit data
    /// @param _depositDataRoot The hash tree root of the deposit data (passed onto the deposit contract on pre stake)
    /// @param _value Total value of the deposit including any credit balance used
    function _deposit(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot, uint256 _value) internal {
        // Validate arguments
        _validateBytes(_validatorPubkey, pubKeyLength);
        _validateBytes(_validatorSignature, signatureLength);
        // Check pre-conditions
        _checkDepositsEnabled();
        // Emit deposit received event
        emit DepositReceived(msg.sender, _value, block.timestamp);
        // Get or deploy a megapool for the caller
        RocketMegapoolFactoryInterface rocketMegapoolFactory = RocketMegapoolFactoryInterface(getContractAddress("rocketMegapoolFactory"));
        RocketMegapoolInterface megapool = RocketMegapoolInterface(rocketMegapoolFactory.getOrDeployContract(msg.sender));
        RocketMegapoolManagerInterface rocketMegapoolManager = RocketMegapoolManagerInterface(getContractAddress("rocketMegapoolManager"));
        // Request a new validator from the megapool
        rocketMegapoolManager.addValidator(address(megapool), megapool.getValidatorCount(), _validatorPubkey);
        megapool.newValidator(_bondAmount, _useExpressTicket, _validatorPubkey, _validatorSignature, _depositDataRoot);
        // Send node operator's bond to the deposit pool
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(getContractAddress("rocketDepositPool"));
        rocketDepositPool.nodeDeposit{value: _value}(_bondAmount);
        // Attempt to assign 1 minipool/megapool
        rocketDepositPool.maybeAssignDeposits(1);
    }

    /// @dev Reverts if deposits are not enabled
    function _checkDepositsEnabled() internal {
        // Get contracts
        RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode"));
        // Check node settings
        require(rocketDAOProtocolSettingsNode.getDepositEnabled(), "Node deposits are currently disabled");
    }

    /// @notice Validates that a byte array has the expected length
    /// @param _data the byte array being validated
    /// @param _length the expected length
    function _validateBytes(bytes memory _data, uint256 _length) pure internal {
        require(_data.length == _length, "Invalid bytes length");
    }

    /// @dev If msg.value does not cover the bond amount, take from node's credit / balance to make up the difference
    ///      Reverts if node does not have enough credit or ETH balance to cover the shortfall
    /// @return Returns the amount of ETH withdrawn from the vault from the node's ETH balance
    function _useCreditOrBalanceIfRequired(uint256 _bondAmount) internal returns (uint256) {
        uint256 balanceToUse = 0;
        uint256 creditToUse = 0;
        uint256 shortFall = _bondAmount - msg.value;
        uint256 credit = getNodeUsableCredit(msg.sender);
        uint256 balance = getNodeEthBalance(msg.sender);
        // Check credit
        require(credit + balance >= shortFall, "Insufficient credit");
        // Calculate amounts to use
        creditToUse = shortFall;
        if (credit < shortFall) {
            balanceToUse = shortFall - credit;
            creditToUse = credit;
        }
        // Update balances
        if (balanceToUse > 0) {
            subUint(keccak256(abi.encodePacked("node.eth.balance", msg.sender)), balanceToUse);
            // Withdraw the funds
            RocketVaultInterface rocketVault = RocketVaultInterface(getContractAddress("rocketVault"));
            rocketVault.withdrawEther(balanceToUse);
        }
        if (creditToUse > 0) {
            subUint(keccak256(abi.encodePacked("node.deposit.credit.balance", msg.sender)), creditToUse);
        }
        return balanceToUse;
    }
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

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

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity >0.5.0 <0.9.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

import "./IERC20.sol";

pragma solidity >0.5.0 <0.9.0;

interface IERC20Burnable is IERC20 {
    function burn(uint256 amount) external;
    function burnFrom(address account, uint256 amount) external;
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only
import "./util/IERC20Burnable.sol";

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

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketVaultWithdrawerInterface {
    function receiveVaultWithdrawalETH() external payable; 
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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 getMaximumStakeForVotingPower() external view returns (uint256);
    function getReducedBond() external view returns (uint256);
    function getBaseBondArray() external view returns (uint256[] memory);
    function getUnstakingPeriod() external view returns (uint256);
    function getWithdrawalCooldown() external view returns (uint256);
    function getMinimumLegacyRPLStake() external view returns (uint256);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

pragma solidity >0.5.0 <0.9.0;

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

interface RocketDepositPoolInterface {
    function getBalance() external view returns (uint256);
    function getNodeBalance() external view returns (uint256);
    function getUserBalance() external view returns (int256);
    function getNodeCreditBalance(address _nodeAddress) external view returns (uint256);
    function getExcessBalance() external view returns (uint256);
    function deposit() external payable;
    function getMaximumDepositAmount() external view returns (uint256);
    function nodeDeposit(uint256 _totalAmount) external payable;
    function recycleDissolvedDeposit() external payable;
    function recycleExcessCollateral() external payable;
    function recycleLiquidatedStake() external payable;
    function maybeAssignDeposits(uint256 _max) external;
    function assignDeposits(uint256 _max) external;
    function withdrawExcessBalance(uint256 _amount) external;
    function requestFunds(uint256 _bondAmount, uint32 _validatorId, uint256 _amount, bool _useExpressTicket) external;
    function exitQueue(address _nodeAddress, uint32 _validatorId, bool _expressQueue) external;
    function applyCredit(address _nodeAddress, uint256 _amount) external;
    function reduceBond(address _nodeAddress, uint256 _amount) external;
    function fundsReturned(address _nodeAddress, uint256 _nodeAmount, uint256 _userAmount) external;
    function withdrawCredit(uint256 _amount) external;
    function withdrawCreditFor(address _nodeAddress, uint256 _amount) external;
    function getQueueTop() external view returns (address receiver, bool assignmentPossible, uint256 headMovedBlock);
    function getQueueIndex() external view returns (uint256);
    function getMinipoolQueueLength() external view returns (uint256);
    function getExpressQueueLength() external view returns (uint256);
    function getStandardQueueLength() external view returns (uint256);
    function getTotalQueueLength() external view returns (uint256);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

interface RocketMegapoolFactoryInterface {
    function initialise() external;
    function getExpectedAddress(address _nodeAddress) external view returns (address);
    function getMegapoolDeployed(address _nodeAddress) external view returns (bool);
    function deployContract(address _nodeAddress) external returns (address);
    function getOrDeployContract(address _nodeAddress) external  returns (address);
    function upgradeDelegate(address _newDelegateAddress) external;
    function getDelegateExpiry(address _delegateAddress) external view returns (uint256);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

    struct Withdrawal {
        uint64 index;
        uint64 validatorIndex;
        bytes20 withdrawalCredentials;
        uint64 amountInGwei;
    }

    struct WithdrawalProof {
        uint64 withdrawalSlot;
        uint16 withdrawalNum;
        Withdrawal withdrawal;
        bytes32[] witnesses;
    }

    struct Validator {
        bytes pubkey;
        bytes32 withdrawalCredentials;
        uint64 effectiveBalance;
        bool slashed;
        uint64 activationEligibilityEpoch;
        uint64 activationEpoch;
        uint64 exitEpoch;
        uint64 withdrawableEpoch;
    }

    struct ValidatorProof {
        uint40 validatorIndex;
        Validator validator;
        bytes32[] witnesses;
    }

    struct SlotProof {
        uint64 slot;
        bytes32[] witnesses;
    }

interface BeaconStateVerifierInterface {
    function verifyValidator(uint64 _slotTimestamp, uint64 _slot, ValidatorProof calldata _proof) external view returns (bool);
    function verifyWithdrawal(uint64 _slotTimestamp, uint64 _slot, WithdrawalProof calldata _proof) external view returns (bool);
    function verifySlot(uint64 _slotTimestamp, SlotProof calldata _proof) external view returns (bool);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

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

interface RocketMegapoolDelegateBaseInterface {
    function deprecate() external;
    function getExpirationTime() external view returns (uint256);
}

File 12 of 19 : RocketMegapoolStorageLayout.sol
/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

import {RocketStorageInterface} from "../../interface/RocketStorageInterface.sol";

// ******************************************************
// Note: This contract MUST only be appended to. All
// deployed megapool contracts must maintain a
// consistent storage layout with RocketMegapoolDelegate.
// ******************************************************

/// @dev The RocketMegapool contract storage layout, shared by RocketMegapoolDelegate and RocketMegapoolBase
abstract contract RocketMegapoolStorageLayout {
    // Status of individual validators
    enum Status {
        InQueue,
        PreStaked,
        Staking,
        Exited,
        Dissolved
    }

    // Information about individual validators
    struct ValidatorInfo {
        uint32 lastAssignmentTime;  // Timestamp of when the last fund assignment took place
        uint32 lastRequestedValue;  // Value in milliether last requested
        uint32 lastRequestedBond;   // Value in milliether of the bond supplied for last request for funds
        uint32 depositValue;        // Total amount deposited to beaconchain in gwei

        bool staked;        // Whether the validator has staked the minimum required to begin validating (32 ETH)
        bool exited;        // Whether the validator has exited the beacon chain
        bool inQueue;       // Whether the validator is currently awaiting funds from the deposit pool
        bool inPrestake;    // Whether the validator is currently awaiting the stake operation
        bool expressUsed;   // Whether the last request for funds consumed an express ticket
        bool dissolved;     // Whether the validator failed to prestake their initial deposit in time
        bool exiting;       // Whether the validator is queued to exit on the beaconchain
        bool locked;        // Whether the validator has been locked by the oDAO for not exiting

        uint64 exitBalance;         // Final balance of the validator at withdrawable_epoch in gwei (amount returned to EL)
        uint64 lockedTime;          // The slot this validator was challenged about its exit status
    }

    //
    // Delegate state
    //

    bool internal storageState;           // Used to prevent direct calls to the delegate contract
    uint256 internal expirationTime;      // Used to store the expiry timestamp of this delegate (0 meaning not expiring)

    //
    // Proxy state
    //

    address internal rocketMegapoolDelegate;  // The current delegate contract address
    bool internal useLatestDelegate;          // Whether this proxy always uses the latest delegate

    //
    // Megapool state
    //

    address internal nodeAddress;             // Megapool owner
    uint32 internal numValidators;            // Number of individual validators handled by this megapool
    uint32 internal numInactiveValidators;    // Number of validators that are no longer contributing to bond requirement

    uint256 internal assignedValue;   // ETH assigned from DP pending prestake/stake
    uint256 internal refundValue;     // ETH refunded to the owner after a dissolution

    uint256 internal nodeBond;              // Value of node ETH bond (including value yet to be assigned/deposited)
    uint256 internal userCapital;           // Value of user supplied capital (including value yet to be assigned/deposited)
    uint256 internal nodeQueuedBond;        // Value of node ETH bond (yet to be assigned/deposited to beacon chain)
    uint256 internal userQueuedCapital;     // Value of user supplied capital (yet to be assigned/deposited to beacon chain)

    uint256 internal debt;            // Amount the owner owes the DP

    uint256 internal lastDistributionTime; // The block of the last time a distribution of rewards was executed

    mapping(uint32 => ValidatorInfo) internal validators;
    mapping(uint32 => bytes) internal prestakeSignatures;
    mapping(uint32 => bytes) internal pubkeys;

    uint32 internal numLockedValidators;        // Number of validators currently locked
    uint32 internal numExitingValidators;       // Number of validators currently exiting

    uint256 internal __version1Boundary;        // Unused full slot width boundary
}

File 13 of 19 : RocketMegapoolDelegateInterface.sol
/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

import "../util/BeaconStateVerifierInterface.sol";
import {RocketMegapoolDelegateBaseInterface} from "./RocketMegapoolDelegateBaseInterface.sol";
import {RocketMegapoolStorageLayout} from "../../contract/megapool/RocketMegapoolStorageLayout.sol";

interface RocketMegapoolDelegateInterface is RocketMegapoolDelegateBaseInterface {
    struct StateProof {
        bytes data;
    }

    function newValidator(uint256 _bondAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external;
    function dequeue(uint32 _validatorId) external;
    function reduceBond(uint256 _amount) external;
    function assignFunds(uint32 _validatorId) external payable;
    function stake(uint32 _validatorId) external;
    function dissolveValidator(uint32 _validatorId) external;
    function getNodeAddress() external returns (address);
    function distribute() external;
    function claim() external;
    function repayDebt() external payable;

    function challengeExit(uint32 _validatorId) external;
    function notifyNotExit(uint32 _validatorId, uint64 _slotTimestamp) external;
    function notifyExit(uint32 _validatorId, uint64 _withdrawableEpoch, uint64 _recentEpoch) external;
    function notifyFinalBalance(uint32 _validatorId, uint64 _amountInGwei, address _caller, uint64 _withdrawalEpoch, uint64 _recentEpoch) external;
    function applyPenalty(uint256 _amount) external;

    function getValidatorCount() external view returns (uint32);
    function getActiveValidatorCount() external view returns (uint32);
    function getExitingValidatorCount() external view returns (uint32);
    function getLockedValidatorCount() external view returns (uint32);
    function getValidatorInfo(uint32 _validatorId) external view returns (RocketMegapoolStorageLayout.ValidatorInfo memory);
    function getValidatorPubkey(uint32 _validatorId) external view returns (bytes memory);
    function getValidatorInfoAndPubkey(uint32 _validatorId) external view returns (RocketMegapoolStorageLayout.ValidatorInfo memory info, bytes memory pubkey);
    function getAssignedValue() external view returns (uint256);
    function getDebt() external view returns (uint256);
    function getRefundValue() external view returns (uint256);
    function getNodeBond() external view returns (uint256);
    function getUserCapital() external view returns (uint256);
    function getNodeQueuedBond() external view returns (uint256);
    function getUserQueuedCapital() external view returns (uint256);
    function calculatePendingRewards() external view returns (uint256 nodeRewards, uint256 voterRewards, uint256 protocolDAORewards, uint256 rethRewards);
    function calculateRewards(uint256 _amount) external view returns (uint256 nodeRewards, uint256 voterRewards, uint256 protocolDAORewards, uint256 rethRewards);
    function getPendingRewards() external view returns (uint256);
    function getLastDistributionTime() external view returns (uint256);
    function getNewValidatorBondRequirement() external view returns (uint256);

    function getWithdrawalCredentials() external view returns (bytes32);
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

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

interface RocketMegapoolProxyInterface {
    function initialise(address _nodeAddress) external;
    function delegateUpgrade() external;
    function setUseLatestDelegate(bool _state) external;
    function getUseLatestDelegate() external view returns (bool);
    function getDelegate() external view returns (address);
    function getEffectiveDelegate() external view returns (address);
    function getDelegateExpired() external view returns (bool);
}

File 15 of 19 : RocketMegapoolInterface.sol
/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

import {RocketMegapoolDelegateInterface} from "./RocketMegapoolDelegateInterface.sol";
import {RocketMegapoolProxyInterface} from "./RocketMegapoolProxyInterface.sol";

interface RocketMegapoolInterface is RocketMegapoolDelegateInterface, RocketMegapoolProxyInterface {
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

import "../../contract/megapool/RocketMegapoolStorageLayout.sol";
import "./RocketMegapoolInterface.sol";
import {BeaconStateVerifierInterface, ValidatorProof, Withdrawal, WithdrawalProof, SlotProof} from "../util/BeaconStateVerifierInterface.sol";

interface RocketMegapoolManagerInterface {
    struct ExitChallenge {
        RocketMegapoolDelegateInterface megapool;
        uint32[] validatorIds;
    }

    function getValidatorCount() external view returns (uint256);
    function addValidator(address _megapoolAddress, uint32 _validatorId, bytes calldata _pubkey) external;
    function getLastChallenger() external view returns (address);
    function getValidatorInfo(uint256 _index) external view returns (bytes memory pubkey, RocketMegapoolStorageLayout.ValidatorInfo memory validatorInfo, address megapool, uint32 validatorId);
    function stake(RocketMegapoolInterface megapool, uint32 _validatorId, uint64 _slotTimestamp, ValidatorProof calldata _proof, SlotProof calldata _slotProof) external;
    function dissolve(RocketMegapoolInterface _megapool, uint32 _validatorId, uint64 _slotTimestamp, ValidatorProof calldata _proof, SlotProof calldata _slotProof) external;
    function notifyExit(RocketMegapoolInterface _megapool, uint32 _validatorId, uint64 _slotTimestamp, ValidatorProof calldata _proof, SlotProof calldata _slotProof) external;
    function challengeExit(ExitChallenge[] calldata _challenges) external;
    function notifyNotExit(RocketMegapoolInterface _megapool, uint32 _validatorId, uint64 _slotTimestamp, ValidatorProof calldata _proof, SlotProof calldata _slotProof) external;
    function notifyFinalBalance(RocketMegapoolInterface megapool, uint32 _validatorId, uint64 _slotTimestamp, WithdrawalProof calldata _proof, ValidatorProof calldata _validatorProof, SlotProof calldata _slotProof) external;
}

File 17 of 19 : MinipoolDeposit.sol
/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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

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

interface RocketNodeDepositInterface {
    struct NodeDeposit {
        uint256 bondAmount;
        bool useExpressTicket;
        bytes validatorPubkey;
        bytes validatorSignature;
        bytes32 depositDataRoot;
    }

    function getBondRequirement(uint256 _numValidators) external view returns (uint256);
    function getNodeDepositCredit(address _nodeAddress) external view returns (uint256);
    function getNodeEthBalance(address _nodeAddress) external view returns (uint256);
    function getNodeCreditAndBalance(address _nodeAddress) external view returns (uint256);
    function getNodeUsableCreditAndBalance(address _nodeAddress) external view returns (uint256);
    function getNodeUsableCredit(address _nodeAddress) external view returns (uint256);
    function increaseDepositCreditBalance(address _nodeOperator, uint256 _amount) external;
    function depositEthFor(address _nodeAddress) external payable;
    function withdrawEth(address _nodeAddress, uint256 _amount) external;
    function deposit(uint256 _depositAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function depositWithCredit(uint256 _depositAmount, bool _useExpressTicket, bytes calldata _validatorPubkey, bytes calldata _validatorSignature, bytes32 _depositDataRoot) external payable;
    function depositMulti(NodeDeposit[] calldata _deposits) external payable;
}

/**
   *       .
   *      / \
   *     |.'.|
   *     |'.'|
   *   ,'|   |'.
   *  |,-'-|-'-.|
   *   __|_| |         _        _      _____           _
   *  | ___ \|        | |      | |    | ___ \         | |
   *  | |_/ /|__   ___| | _____| |_   | |_/ /__   ___ | |
   *  |    // _ \ / __| |/ / _ \ __|  |  __/ _ \ / _ \| |
   *  | |\ \ (_) | (__|   <  __/ |_   | | | (_) | (_) | |
   *  \_| \_\___/ \___|_|\_\___|\__|  \_|  \___/ \___/|_|
   * +---------------------------------------------------+
   * |    DECENTRALISED STAKING PROTOCOL FOR ETHEREUM    |
   * +---------------------------------------------------+
   *
   *  Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to
   *  be community-owned, decentralised, permissionless, & trustless.
   *
   *  For more information about Rocket Pool, visit https://rocketpool.net
   *
   *  Authored by the Rocket Pool Core Team
   *  Contributors: https://github.com/rocket-pool/rocketpool/graphs/contributors
   *  A special thanks to the Rocket Pool community for all their contributions.
   *
   */

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 sender that isn't a registered megapool
    */
    modifier onlyRegisteredMegapool(address _megapoolAddress) {
        require(getBool(keccak256(abi.encodePacked("megapool.exists", _megapoolAddress))), "Invalid megapool");
        _;
    }

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

    /**
    * @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); }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nodeAddress","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"DepositFor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"DepositReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"numberOfValidators","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBond","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"MultiDepositReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nodeAddress","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"bool","name":"_useExpressTicket","type":"bool"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"depositEthFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"bondAmount","type":"uint256"},{"internalType":"bool","name":"useExpressTicket","type":"bool"},{"internalType":"bytes","name":"validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"depositDataRoot","type":"bytes32"}],"internalType":"struct RocketNodeDepositInterface.NodeDeposit[]","name":"_deposits","type":"tuple[]"}],"name":"depositMulti","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"bool","name":"_useExpressTicket","type":"bool"},{"internalType":"bytes","name":"_validatorPubkey","type":"bytes"},{"internalType":"bytes","name":"_validatorSignature","type":"bytes"},{"internalType":"bytes32","name":"_depositDataRoot","type":"bytes32"}],"name":"depositWithCredit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numValidators","type":"uint256"}],"name":"getBondRequirement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeCreditAndBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeDepositCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeEthBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeUsableCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"}],"name":"getNodeUsableCreditAndBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseDepositCreditBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiveVaultWithdrawalETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodeAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608034608157601f61272e38819003918201601f19168301916001600160401b03831184841017608657808492602094604052833981010312608157516001600160a01b0381168103608157600080546001600160a81b03191660089290921b610100600160a81b0316919091176005179055604051612691908161009d8239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060405260043610156100b6575b361561001957600080fd5b6100b473ffffffffffffffffffffffffffffffffffffffff6100ac61003c61165b565b6040516100a48161007860208201947f636f6e74726163742e616464726573730000000000000000000000000000000086526030830190611401565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261131c565b519020611bf4565b16331461142c565b005b6000803560e01c80631b9a91a414610dee578063206b427114610dc35780632cb4730614610cc75780633ee36db414610c90578063493c946714610c6c57806354fd4d5014610c4c578063643ff9fe14610adf5780636637714e14610abb5780639408290614610a97578063c095415d14610a45578063dd2a624414610a1e578063e75574d614610974578063ea7b2bec1461036a5763eee3f07a1461015c575061000e565b60206003193601126103675761017061125f565b61019b73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b16301461142c565b6102006101fb60405160208101906101f38161007887856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b519020611c89565b611491565b8173ffffffffffffffffffffffffffffffffffffffff61022661022161155e565b611d16565b16803b156103585781600491604051928380927f98ea5fca00000000000000000000000000000000000000000000000000000000825234905af1801561035c57610343575b50506102f7604051602081016102ed826102c186846bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810184528361131c565b34915190206121bf565b6040513481524260208201527f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1604073ffffffffffffffffffffffffffffffffffffffff33941692a380f35b8161034d9161131c565b61035857813861026b565b5080fd5b6040513d84823e3d90fd5b80fd5b5060206003193601126103675760043567ffffffffffffffff8111610358573660238201121561035857806004013567ffffffffffffffff8111610970573660248260051b84010111610970576103da73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b6104326101fb60405160208101906101f38161007833856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b801561091257610440612430565b82602073ffffffffffffffffffffffffffffffffffffffff610463610221611a25565b166024604051809481937f959a26f20000000000000000000000000000000000000000000000000000000083523360048401525af180156108655773ffffffffffffffffffffffffffffffffffffffff9185916108e3575b50929192169273ffffffffffffffffffffffffffffffffffffffff6104e1610221611a60565b16938182937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3d81360301915b868610156107285760248660051b83010135838112156106bf5782019060248201606483019261054f61054a6105438685611a9b565b3691611aec565b61253a565b60848101936105696105646105438786611a9b565b6125c1565b6040517f7071688a0000000000000000000000000000000000000000000000000000000081526020816004818c5afa9081156106ef578a916106fa575b508c6105b28386611a9b565b9290913b156106ce57908e8c92838d6105fa604051978896879586947f7127adae00000000000000000000000000000000000000000000000000000000865260048601611b7e565b03925af180156106ef57908a916106d6575b505082359460448301359182151583036106d25761062d6106359186611a9b565b929095611a9b565b918a3b156106ce57928b94926106809260a49560405198899788977f94a67ef90000000000000000000000000000000000000000000000000000000089520135948c60048901611bb6565b0381838a5af180156106c3579087916106aa575b50506001916106a291611599565b95019461050d565b816106b49161131c565b6106bf578538610694565b8580fd5b6040513d89823e3d90fd5b8b80fd5b8a80fd5b816106e09161131c565b6106eb57883861060c565b8880fd5b6040513d8c823e3d90fd5b61071b915060203d8111610721575b610713818361131c565b810190611b23565b386105a6565b503d610709565b8685918034116108855782918291803410610874575b6040518281528160208201524260408201527f93fa5225d22d9e30472233fc2b47735b2b138382fe4884fd10cfca52ba20349160603392a26107a173ffffffffffffffffffffffffffffffffffffffff61079961022161165b565b169334611599565b90833b156108705784906024604051809481937f22b1751d0000000000000000000000000000000000000000000000000000000083526004830152875af1908115610865578491610850575b5050813b1561084c5782916024839260405194859384927fa673c8e100000000000000000000000000000000000000000000000000000000845260048401525af1801561035c5761083b5750f35b816108459161131c565b6103675780f35b5050fd5b8161085a9161131c565b61084c5782856107ed565b6040513d86823e3d90fd5b8480fd5b915061087f8261223d565b9161073e565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45786365737320626f6e642076616c756520737570706c6965640000000000006044820152fd5b610905915060203d60201161090b575b6108fd818361131c565b8101906114f6565b386104bb565b503d6108f3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d75737420706572666f726d206174206c656173742031206465706f736974006044820152fd5b8280fd5b50610a1b610981366112b5565b946109ab73ffffffffffffffffffffffffffffffffffffffff61019361003c9794979695966113c6565b610a036101fb60405160208101906101f38161007833856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b610a15610a0f8861223d565b34611599565b96611dd3565b80f35b5034610367576020600319360112610367576020610a3d6004356117d2565b604051908152f35b508060031936011261036757610a7473ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b610a1b73ffffffffffffffffffffffffffffffffffffffff6100ac61003c61155e565b5034610367576020600319360112610367576020610a3d610ab661125f565b611696565b5034610367576020600319360112610367576020610a3d610ada61125f565b611606565b503461036757604060031936011261036757610af961125f565b610b1c73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b610b6260405160208101907f6d696e69706f6f6c2e657869737473000000000000000000000000000000000082523360601b602f820152602381526101f360438261131c565b15610bc957610a1b9060405190610bbd826102c16020820193846bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b602435915190206121bf565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f72616374000000000000000000000000000000000000000000000000000000006064820152fd5b503461036757806003193601126103675760ff6020915416604051908152f35b5034610367576020600319360112610367576020610a3d610c8b61125f565b6115a6565b5034610367576020600319360112610367576020610a3d610caf61125f565b610cc1610cbb82611696565b91611606565b90611599565b50610cd1366112b5565b93610cfb73ffffffffffffffffffffffffffffffffffffffff61019361003c9998999694966113c6565b610d536101fb60405160208101906101f38161007833856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b853403610d6557610a1b963496611dd3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642076616c7565000000000000000000000000000000000000006044820152fd5b5034610367576020600319360112610367576020610a3d610de261125f565b610cc1610cbb826115a6565b503461036757604060031936011261036757610e0861125f565b602435610e2e73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b610e866101fb60405160208101906101f38161007888856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b73ffffffffffffffffffffffffffffffffffffffff835460081c16906040517f5b49ff6200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841692836004830152602082602481845afa91821561115157869261123e575b5073ffffffffffffffffffffffffffffffffffffffff8216948533036111ba57610f2681611606565b84811061115c57610f8d858993604051610f84816100786020820194856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b51902092611522565b90833b15610970576044908360405195869485937fe2a4853a000000000000000000000000000000000000000000000000000000008552600485015260248401525af180156111515761113d575b50849073ffffffffffffffffffffffffffffffffffffffff610ffe61022161155e565b1690813b15610970578280926024604051809581937f3bed33ce0000000000000000000000000000000000000000000000000000000083528960048401525af19081156111325784928492611118575b50819282915af13d15611113573d6110658161138c565b90611073604051928361131c565b81528560203d92013e5b156110b55760407fc2b4a290c20fb28939d29f102514fbffd2b73c059ffba8b78250c94161d5fcc6918151908152426020820152a380f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4661696c656420746f20776974686472617720455448000000000000000000006044820152fd5b61107d565b611125919350829061131c565b610358578183913861104e565b6040513d85823e3d90fd5b8561114a9196929661131c565b9338610fdb565b6040513d88823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4f6e6c79207769746864726177616c20616464726573732063616e207769746860448201527f64726177204554480000000000000000000000000000000000000000000000006064820152fd5b61125891925060203d60201161090b576108fd818361131c565b9038610efd565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361128257565b600080fd5b9181601f840112156112825782359167ffffffffffffffff8311611282576020838186019501011161128257565b60a060031982011261128257600435916024358015158103611282579160443567ffffffffffffffff811161128257816112f191600401611287565b929092916064359067ffffffffffffffff82116112825761131491600401611287565b909160843590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761135d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161135d57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b604051906113d560408361131c565b601182527f726f636b65744e6f64654465706f7369740000000000000000000000000000006020830152565b9081519160005b838110611419575050016000815290565b8060208092840101518185015201611408565b1561143357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e7472616374000000006044820152fd5b1561149857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152fd5b90816020910312611282575173ffffffffffffffffffffffffffffffffffffffff811681036112825790565b9190820391821161152f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6040519061156d60408361131c565b600b82527f726f636b65745661756c740000000000000000000000000000000000000000006020830152565b9190820180921161152f57565b611603906040516115fb816100786020820194856bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b51902061212c565b90565b611603906040516115fb816100786020820194856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b6040519061166a60408361131c565b601182527f726f636b65744465706f736974506f6f6c0000000000000000000000000000006020830152565b600490602073ffffffffffffffffffffffffffffffffffffffff6116bb61022161165b565b16604051938480927f12065fe00000000000000000000000000000000000000000000000000000000082525afa91821561174857600092611712575b50611701906115a6565b9080821161170d575090565b905090565b90916020823d602011611740575b8161172d6020938361131c565b81010312610367575051906117016116f7565b3d9150611720565b6040513d6000823e3d90fd5b6040519061176360408361131c565b601d82527f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000006020830152565b80518210156117a35760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8015611a1f5773ffffffffffffffffffffffffffffffffffffffff6117f8610221611754565b1690604051917f1dd9a0c1000000000000000000000000000000000000000000000000000000008352600083600481845afa9283156117485760009361194f575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820182811161152f578351811061193f5750906020600492604051938480927f4c9b75d60000000000000000000000000000000000000000000000000000000082525afa9182156117485760009261190b575b508251907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161152f576118e96118f2928561178f565b51935190611522565b81810291818304149015171561152f5761160391611599565b90916020823d602011611937575b816119266020938361131c565b8101031261036757505190386118ae565b3d9150611919565b91505061194b9161178f565b5190565b9290923d8083833e611961818361131c565b8101906020818303126109705780519067ffffffffffffffff8211611a1b57019181601f840112156103675782519267ffffffffffffffff84116119ee578360051b91604051946119b5602085018761131c565b85526020808601938301019384116103675750602001905b8282106119de575050509138611839565b81518152602091820191016119cd565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8380fd5b50600090565b60405190611a3460408361131c565b601582527f726f636b65744d656761706f6f6c466163746f727900000000000000000000006020830152565b60405190611a6f60408361131c565b601582527f726f636b65744d656761706f6f6c4d616e6167657200000000000000000000006020830152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611282570180359067ffffffffffffffff82116112825760200191813603831361128257565b929192611af88261138c565b91611b06604051938461131c565b829481845281830111611282578281602093846000960137010152565b90816020910312611282575163ffffffff811681036112825790565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b63ffffffff611603959373ffffffffffffffffffffffffffffffffffffffff6060941683521660208201528160408201520191611b3f565b9796959192611bef9460809694611be1938b52151560208b015260a060408b015260a08a0191611b3f565b918783036060890152611b3f565b930152565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f21f8a72100000000000000000000000000000000000000000000000000000000835260048301525afa90811561174857600091611c58575090565b611603915060203d60201161090b576108fd818361131c565b90816020910312611282575180151581036112825790565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f7ae1cfca00000000000000000000000000000000000000000000000000000000835260048301525afa90811561174857600091611ced575090565b611603915060203d602011611d0f575b611d07818361131c565b810190611c71565b503d611cfd565b611d56906040516100a48161007860208201947f636f6e74726163742e616464726573730000000000000000000000000000000086526030830190611401565b73ffffffffffffffffffffffffffffffffffffffff811615611d755790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e6400000000000000000000000000006044820152fd5b9596949693919293611de961054a368787611aec565b611df7610564368a86611aec565b611dff612430565b604051976000988781524260208201527f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f88863160403392a288602073ffffffffffffffffffffffffffffffffffffffff611e58610221611a25565b166024604051809481937f959a26f20000000000000000000000000000000000000000000000000000000083523360048401525af19081156106ef579073ffffffffffffffffffffffffffffffffffffffff918b9161210d575b50169373ffffffffffffffffffffffffffffffffffffffff611ed5610221611a60565b166040517f7071688a0000000000000000000000000000000000000000000000000000000081526020816004818a5afa908115612102578c916120e3575b50813b156106ce578789928d92838a611f5b604051978896879586947f7127adae00000000000000000000000000000000000000000000000000000000865260048601611b7e565b03925af180156120d8576120c4575b50843b156120c057611fb48a9695949387938b936040519a8b998a9889977f94a67ef900000000000000000000000000000000000000000000000000000000895260048901611bb6565b03925af18015610865579084916120ab575b505073ffffffffffffffffffffffffffffffffffffffff611fe861022161165b565b1691823b15611a1b5783906024604051809481937f22b1751d0000000000000000000000000000000000000000000000000000000083526004830152865af1801561113257908391612096575b5050803b15610358578180916024604051809481937fa673c8e1000000000000000000000000000000000000000000000000000000008352600160048401525af1801561035c57612084575050565b61208f82809261131c565b6103675750565b816120a09161131c565b610358578138612035565b816120b59161131c565b610970578238611fc6565b8980fd5b8a6120d1919b929b61131c565b9838611f6a565b6040513d8d823e3d90fd5b6120fc915060203d60201161072157610713818361131c565b38611f13565b6040513d8e823e3d90fd5b612126915060203d60201161090b576108fd818361131c565b38611eb2565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937fbd02d0f500000000000000000000000000000000000000000000000000000000835260048301525afa90811561174857600091612190575090565b90506020813d6020116121b7575b816121ab6020938361131c565b81010312611282575190565b3d915061219e565b60009173ffffffffffffffffffffffffffffffffffffffff835460081c1691823b15611a1b5790604484928360405195869485937fadb353dc000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561035c57612230575050565b8161223a9161131c565b50565b600061224b81923490611522565b9061225533611696565b8261226861226233611606565b83611599565b106123d257828082106123bb575b5050826122e5575b5080612288575090565b6040517f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000602082019081523360601b6bffffffffffffffffffffffff1916603b83015261160392916122dd81604f8101610078565b5190206125ea565b61233b8360405160208101906122dd8161007833856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b73ffffffffffffffffffffffffffffffffffffffff61235b61022161155e565b16803b15610358578180916024604051809481937f3bed33ce0000000000000000000000000000000000000000000000000000000083528960048401525af1801561035c576123ab575b5061227e565b816123b59161131c565b386123a5565b8194506123c9929350611522565b91903880612276565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e73756666696369656e7420637265646974000000000000000000000000006044820152fd5b6004602073ffffffffffffffffffffffffffffffffffffffff612454610221611754565b16604051928380927f6ada78470000000000000000000000000000000000000000000000000000000082525afa9081156117485760009161251b575b501561249857565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e6f6465206465706f73697473206172652063757272656e746c79206469736160448201527f626c6564000000000000000000000000000000000000000000000000000000006064820152fd5b612534915060203d602011611d0f57611d07818361131c565b38612490565b517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd00161256357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e76616c6964206279746573206c656e6774680000000000000000000000006044820152fd5b517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00161256357565b60009173ffffffffffffffffffffffffffffffffffffffff835460081c1691823b15611a1b5790604484928360405195869485937febb9d8c9000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561035c5761223057505056fea2646970667358221220e9af20f86f7a9da34d9aa69df91dd20e3131779d8e768599d7e0d327a4a2972d64736f6c634300081e00330000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

Deployed Bytecode

0x608060405260043610156100b6575b361561001957600080fd5b6100b473ffffffffffffffffffffffffffffffffffffffff6100ac61003c61165b565b6040516100a48161007860208201947f636f6e74726163742e616464726573730000000000000000000000000000000086526030830190611401565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261131c565b519020611bf4565b16331461142c565b005b6000803560e01c80631b9a91a414610dee578063206b427114610dc35780632cb4730614610cc75780633ee36db414610c90578063493c946714610c6c57806354fd4d5014610c4c578063643ff9fe14610adf5780636637714e14610abb5780639408290614610a97578063c095415d14610a45578063dd2a624414610a1e578063e75574d614610974578063ea7b2bec1461036a5763eee3f07a1461015c575061000e565b60206003193601126103675761017061125f565b61019b73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b16301461142c565b6102006101fb60405160208101906101f38161007887856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b519020611c89565b611491565b8173ffffffffffffffffffffffffffffffffffffffff61022661022161155e565b611d16565b16803b156103585781600491604051928380927f98ea5fca00000000000000000000000000000000000000000000000000000000825234905af1801561035c57610343575b50506102f7604051602081016102ed826102c186846bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810184528361131c565b34915190206121bf565b6040513481524260208201527f512d56e1f791d3bc07b8085104584ec42faefbefed34bbc0b881d8da16a8ebe1604073ffffffffffffffffffffffffffffffffffffffff33941692a380f35b8161034d9161131c565b61035857813861026b565b5080fd5b6040513d84823e3d90fd5b80fd5b5060206003193601126103675760043567ffffffffffffffff8111610358573660238201121561035857806004013567ffffffffffffffff8111610970573660248260051b84010111610970576103da73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b6104326101fb60405160208101906101f38161007833856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b801561091257610440612430565b82602073ffffffffffffffffffffffffffffffffffffffff610463610221611a25565b166024604051809481937f959a26f20000000000000000000000000000000000000000000000000000000083523360048401525af180156108655773ffffffffffffffffffffffffffffffffffffffff9185916108e3575b50929192169273ffffffffffffffffffffffffffffffffffffffff6104e1610221611a60565b16938182937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3d81360301915b868610156107285760248660051b83010135838112156106bf5782019060248201606483019261054f61054a6105438685611a9b565b3691611aec565b61253a565b60848101936105696105646105438786611a9b565b6125c1565b6040517f7071688a0000000000000000000000000000000000000000000000000000000081526020816004818c5afa9081156106ef578a916106fa575b508c6105b28386611a9b565b9290913b156106ce57908e8c92838d6105fa604051978896879586947f7127adae00000000000000000000000000000000000000000000000000000000865260048601611b7e565b03925af180156106ef57908a916106d6575b505082359460448301359182151583036106d25761062d6106359186611a9b565b929095611a9b565b918a3b156106ce57928b94926106809260a49560405198899788977f94a67ef90000000000000000000000000000000000000000000000000000000089520135948c60048901611bb6565b0381838a5af180156106c3579087916106aa575b50506001916106a291611599565b95019461050d565b816106b49161131c565b6106bf578538610694565b8580fd5b6040513d89823e3d90fd5b8b80fd5b8a80fd5b816106e09161131c565b6106eb57883861060c565b8880fd5b6040513d8c823e3d90fd5b61071b915060203d8111610721575b610713818361131c565b810190611b23565b386105a6565b503d610709565b8685918034116108855782918291803410610874575b6040518281528160208201524260408201527f93fa5225d22d9e30472233fc2b47735b2b138382fe4884fd10cfca52ba20349160603392a26107a173ffffffffffffffffffffffffffffffffffffffff61079961022161165b565b169334611599565b90833b156108705784906024604051809481937f22b1751d0000000000000000000000000000000000000000000000000000000083526004830152875af1908115610865578491610850575b5050813b1561084c5782916024839260405194859384927fa673c8e100000000000000000000000000000000000000000000000000000000845260048401525af1801561035c5761083b5750f35b816108459161131c565b6103675780f35b5050fd5b8161085a9161131c565b61084c5782856107ed565b6040513d86823e3d90fd5b8480fd5b915061087f8261223d565b9161073e565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45786365737320626f6e642076616c756520737570706c6965640000000000006044820152fd5b610905915060203d60201161090b575b6108fd818361131c565b8101906114f6565b386104bb565b503d6108f3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d75737420706572666f726d206174206c656173742031206465706f736974006044820152fd5b8280fd5b50610a1b610981366112b5565b946109ab73ffffffffffffffffffffffffffffffffffffffff61019361003c9794979695966113c6565b610a036101fb60405160208101906101f38161007833856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b610a15610a0f8861223d565b34611599565b96611dd3565b80f35b5034610367576020600319360112610367576020610a3d6004356117d2565b604051908152f35b508060031936011261036757610a7473ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b610a1b73ffffffffffffffffffffffffffffffffffffffff6100ac61003c61155e565b5034610367576020600319360112610367576020610a3d610ab661125f565b611696565b5034610367576020600319360112610367576020610a3d610ada61125f565b611606565b503461036757604060031936011261036757610af961125f565b610b1c73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b610b6260405160208101907f6d696e69706f6f6c2e657869737473000000000000000000000000000000000082523360601b602f820152602381526101f360438261131c565b15610bc957610a1b9060405190610bbd826102c16020820193846bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b602435915190206121bf565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c6964206f72206f75746461746564206e6574776f726b20636f6e7460448201527f72616374000000000000000000000000000000000000000000000000000000006064820152fd5b503461036757806003193601126103675760ff6020915416604051908152f35b5034610367576020600319360112610367576020610a3d610c8b61125f565b6115a6565b5034610367576020600319360112610367576020610a3d610caf61125f565b610cc1610cbb82611696565b91611606565b90611599565b50610cd1366112b5565b93610cfb73ffffffffffffffffffffffffffffffffffffffff61019361003c9998999694966113c6565b610d536101fb60405160208101906101f38161007833856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b853403610d6557610a1b963496611dd3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642076616c7565000000000000000000000000000000000000006044820152fd5b5034610367576020600319360112610367576020610a3d610de261125f565b610cc1610cbb826115a6565b503461036757604060031936011261036757610e0861125f565b602435610e2e73ffffffffffffffffffffffffffffffffffffffff61019361003c6113c6565b610e866101fb60405160208101906101f38161007888856bffffffffffffffffffffffff19601f927f6e6f64652e657869737473000000000000000000000000000000000000000000835260601b16600b8201520190565b73ffffffffffffffffffffffffffffffffffffffff835460081c16906040517f5b49ff6200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841692836004830152602082602481845afa91821561115157869261123e575b5073ffffffffffffffffffffffffffffffffffffffff8216948533036111ba57610f2681611606565b84811061115c57610f8d858993604051610f84816100786020820194856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b51902092611522565b90833b15610970576044908360405195869485937fe2a4853a000000000000000000000000000000000000000000000000000000008552600485015260248401525af180156111515761113d575b50849073ffffffffffffffffffffffffffffffffffffffff610ffe61022161155e565b1690813b15610970578280926024604051809581937f3bed33ce0000000000000000000000000000000000000000000000000000000083528960048401525af19081156111325784928492611118575b50819282915af13d15611113573d6110658161138c565b90611073604051928361131c565b81528560203d92013e5b156110b55760407fc2b4a290c20fb28939d29f102514fbffd2b73c059ffba8b78250c94161d5fcc6918151908152426020820152a380f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4661696c656420746f20776974686472617720455448000000000000000000006044820152fd5b61107d565b611125919350829061131c565b610358578183913861104e565b6040513d85823e3d90fd5b8561114a9196929661131c565b9338610fdb565b6040513d88823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4f6e6c79207769746864726177616c20616464726573732063616e207769746860448201527f64726177204554480000000000000000000000000000000000000000000000006064820152fd5b61125891925060203d60201161090b576108fd818361131c565b9038610efd565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361128257565b600080fd5b9181601f840112156112825782359167ffffffffffffffff8311611282576020838186019501011161128257565b60a060031982011261128257600435916024358015158103611282579160443567ffffffffffffffff811161128257816112f191600401611287565b929092916064359067ffffffffffffffff82116112825761131491600401611287565b909160843590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761135d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161135d57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b604051906113d560408361131c565b601182527f726f636b65744e6f64654465706f7369740000000000000000000000000000006020830152565b9081519160005b838110611419575050016000815290565b8060208092840101518185015201611408565b1561143357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496e76616c6964206f72206f7574646174656420636f6e7472616374000000006044820152fd5b1561149857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206e6f646500000000000000000000000000000000000000006044820152fd5b90816020910312611282575173ffffffffffffffffffffffffffffffffffffffff811681036112825790565b9190820391821161152f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6040519061156d60408361131c565b600b82527f726f636b65745661756c740000000000000000000000000000000000000000006020830152565b9190820180921161152f57565b611603906040516115fb816100786020820194856bffffffffffffffffffffffff19602f927f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000835260601b16601b8201520190565b51902061212c565b90565b611603906040516115fb816100786020820194856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b6040519061166a60408361131c565b601182527f726f636b65744465706f736974506f6f6c0000000000000000000000000000006020830152565b600490602073ffffffffffffffffffffffffffffffffffffffff6116bb61022161165b565b16604051938480927f12065fe00000000000000000000000000000000000000000000000000000000082525afa91821561174857600092611712575b50611701906115a6565b9080821161170d575090565b905090565b90916020823d602011611740575b8161172d6020938361131c565b81010312610367575051906117016116f7565b3d9150611720565b6040513d6000823e3d90fd5b6040519061176360408361131c565b601d82527f726f636b657444414f50726f746f636f6c53657474696e67734e6f64650000006020830152565b80518210156117a35760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8015611a1f5773ffffffffffffffffffffffffffffffffffffffff6117f8610221611754565b1690604051917f1dd9a0c1000000000000000000000000000000000000000000000000000000008352600083600481845afa9283156117485760009361194f575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820182811161152f578351811061193f5750906020600492604051938480927f4c9b75d60000000000000000000000000000000000000000000000000000000082525afa9182156117485760009261190b575b508251907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161152f576118e96118f2928561178f565b51935190611522565b81810291818304149015171561152f5761160391611599565b90916020823d602011611937575b816119266020938361131c565b8101031261036757505190386118ae565b3d9150611919565b91505061194b9161178f565b5190565b9290923d8083833e611961818361131c565b8101906020818303126109705780519067ffffffffffffffff8211611a1b57019181601f840112156103675782519267ffffffffffffffff84116119ee578360051b91604051946119b5602085018761131c565b85526020808601938301019384116103675750602001905b8282106119de575050509138611839565b81518152602091820191016119cd565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8380fd5b50600090565b60405190611a3460408361131c565b601582527f726f636b65744d656761706f6f6c466163746f727900000000000000000000006020830152565b60405190611a6f60408361131c565b601582527f726f636b65744d656761706f6f6c4d616e6167657200000000000000000000006020830152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611282570180359067ffffffffffffffff82116112825760200191813603831361128257565b929192611af88261138c565b91611b06604051938461131c565b829481845281830111611282578281602093846000960137010152565b90816020910312611282575163ffffffff811681036112825790565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b63ffffffff611603959373ffffffffffffffffffffffffffffffffffffffff6060941683521660208201528160408201520191611b3f565b9796959192611bef9460809694611be1938b52151560208b015260a060408b015260a08a0191611b3f565b918783036060890152611b3f565b930152565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f21f8a72100000000000000000000000000000000000000000000000000000000835260048301525afa90811561174857600091611c58575090565b611603915060203d60201161090b576108fd818361131c565b90816020910312611282575180151581036112825790565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937f7ae1cfca00000000000000000000000000000000000000000000000000000000835260048301525afa90811561174857600091611ced575090565b611603915060203d602011611d0f575b611d07818361131c565b810190611c71565b503d611cfd565b611d56906040516100a48161007860208201947f636f6e74726163742e616464726573730000000000000000000000000000000086526030830190611401565b73ffffffffffffffffffffffffffffffffffffffff811615611d755790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f436f6e7472616374206e6f7420666f756e6400000000000000000000000000006044820152fd5b9596949693919293611de961054a368787611aec565b611df7610564368a86611aec565b611dff612430565b604051976000988781524260208201527f7aa1a8eb998c779420645fc14513bf058edb347d95c2fc2e6845bdc22f88863160403392a288602073ffffffffffffffffffffffffffffffffffffffff611e58610221611a25565b166024604051809481937f959a26f20000000000000000000000000000000000000000000000000000000083523360048401525af19081156106ef579073ffffffffffffffffffffffffffffffffffffffff918b9161210d575b50169373ffffffffffffffffffffffffffffffffffffffff611ed5610221611a60565b166040517f7071688a0000000000000000000000000000000000000000000000000000000081526020816004818a5afa908115612102578c916120e3575b50813b156106ce578789928d92838a611f5b604051978896879586947f7127adae00000000000000000000000000000000000000000000000000000000865260048601611b7e565b03925af180156120d8576120c4575b50843b156120c057611fb48a9695949387938b936040519a8b998a9889977f94a67ef900000000000000000000000000000000000000000000000000000000895260048901611bb6565b03925af18015610865579084916120ab575b505073ffffffffffffffffffffffffffffffffffffffff611fe861022161165b565b1691823b15611a1b5783906024604051809481937f22b1751d0000000000000000000000000000000000000000000000000000000083526004830152865af1801561113257908391612096575b5050803b15610358578180916024604051809481937fa673c8e1000000000000000000000000000000000000000000000000000000008352600160048401525af1801561035c57612084575050565b61208f82809261131c565b6103675750565b816120a09161131c565b610358578138612035565b816120b59161131c565b610970578238611fc6565b8980fd5b8a6120d1919b929b61131c565b9838611f6a565b6040513d8d823e3d90fd5b6120fc915060203d60201161072157610713818361131c565b38611f13565b6040513d8e823e3d90fd5b612126915060203d60201161090b576108fd818361131c565b38611eb2565b602073ffffffffffffffffffffffffffffffffffffffff60005460081c16916024604051809481937fbd02d0f500000000000000000000000000000000000000000000000000000000835260048301525afa90811561174857600091612190575090565b90506020813d6020116121b7575b816121ab6020938361131c565b81010312611282575190565b3d915061219e565b60009173ffffffffffffffffffffffffffffffffffffffff835460081c1691823b15611a1b5790604484928360405195869485937fadb353dc000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561035c57612230575050565b8161223a9161131c565b50565b600061224b81923490611522565b9061225533611696565b8261226861226233611606565b83611599565b106123d257828082106123bb575b5050826122e5575b5080612288575090565b6040517f6e6f64652e6465706f7369742e6372656469742e62616c616e63650000000000602082019081523360601b6bffffffffffffffffffffffff1916603b83015261160392916122dd81604f8101610078565b5190206125ea565b61233b8360405160208101906122dd8161007833856bffffffffffffffffffffffff196024927f6e6f64652e6574682e62616c616e636500000000000000000000000000000000835260601b1660108201520190565b73ffffffffffffffffffffffffffffffffffffffff61235b61022161155e565b16803b15610358578180916024604051809481937f3bed33ce0000000000000000000000000000000000000000000000000000000083528960048401525af1801561035c576123ab575b5061227e565b816123b59161131c565b386123a5565b8194506123c9929350611522565b91903880612276565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e73756666696369656e7420637265646974000000000000000000000000006044820152fd5b6004602073ffffffffffffffffffffffffffffffffffffffff612454610221611754565b16604051928380927f6ada78470000000000000000000000000000000000000000000000000000000082525afa9081156117485760009161251b575b501561249857565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4e6f6465206465706f73697473206172652063757272656e746c79206469736160448201527f626c6564000000000000000000000000000000000000000000000000000000006064820152fd5b612534915060203d602011611d0f57611d07818361131c565b38612490565b517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd00161256357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e76616c6964206279746573206c656e6774680000000000000000000000006044820152fd5b517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00161256357565b60009173ffffffffffffffffffffffffffffffffffffffff835460081c1691823b15611a1b5790604484928360405195869485937febb9d8c9000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561035c5761223057505056fea2646970667358221220e9af20f86f7a9da34d9aa69df91dd20e3131779d8e768599d7e0d327a4a2972d64736f6c634300081e0033

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

0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46

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

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


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.