```\nfunction addStake(uint32 unstakeDelaySec) public payable {\n    DepositInfo storage info = deposits[msg.sender];\n    require(unstakeDelaySec > 0, "must specify unstake delay");\n    require(unstakeDelaySec >= info.unstakeDelaySec, "cannot decrease unstake time");\n    uint256 stake = info.stake + msg.value;\n    require(stake > 0, "no stake specified");\n    require(stake <= type(uint112).max, "stake overflow");\n    deposits[msg.sender] = DepositInfo(\n        info.deposit,\n        true,\n        uint112(stake),\n        unstakeDelaySec,\n        0\n    );\n    emit StakeLocked(msg.sender, stake, unstakeDelaySec);\n}\n```\n