```\nfunction depositEther() override external payable onlyLatestNetworkContract {\n    // Get contract key\n    bytes32 contractKey = keccak256(abi.encodePacked(getContractName(msg.sender)));\n    // Update contract balance\n    etherBalances[contractKey] = etherBalances[contractKey].add(msg.value);\n    // Emit ether deposited event\n    emit EtherDeposited(contractKey, msg.value, block.timestamp);\n}\n```\n