{
    "Function": "depositEther",
    "File": "src/frxETHMinter.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol",
        "src/OperatorRegistry.sol",
        "src/Utils/Owned.sol"
    ],
    "High-Level Calls": [
        "IDepositContract"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "nonReentrant",
        "balance(address)",
        "getNextValidator"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function depositEther() external nonReentrant {\n        // Initial pause check\n        require(!depositEtherPaused, \"Depositing ETH is paused\");\n\n        // See how many deposits can be made. Truncation desired.\n        uint256 numDeposits = (address(this).balance - currentWithheldETH) / DEPOSIT_SIZE;\n        require(numDeposits > 0, \"Not enough ETH in contract\");\n\n        // Give each deposit chunk to an empty validator\n        for (uint256 i = 0; i < numDeposits; ++i) {\n            // Get validator information\n            (\n                bytes memory pubKey,\n                bytes memory withdrawalCredential,\n                bytes memory signature,\n                bytes32 depositDataRoot\n            ) = getNextValidator(); // Will revert if there are not enough free validators\n\n            // Make sure the validator hasn't been deposited into already, to prevent stranding an extra 32 eth\n            // until withdrawals are allowed\n            require(!activeValidators[pubKey], \"Validator already has 32 ETH\");\n\n            // Deposit the ether in the ETH 2.0 deposit contract\n            depositContract.deposit{value: DEPOSIT_SIZE}(\n                pubKey,\n                withdrawalCredential,\n                signature,\n                depositDataRoot\n            );\n\n            // Set the validator as used so it won't get an extra 32 ETH\n            activeValidators[pubKey] = true;\n\n            emit DepositSent(pubKey, withdrawalCredential);\n        }\n    }"
}