pragma solidity 0.8.4; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol"; contract test { // Assume other required functionality is correctly implemented // For e.g. users have deposited balances in the contract mapping (address => uint256) balances; function withdrawBalance() external { msg.sender.call{value: balances[msg.sender]}(""); balances[msg.sender] = 0; } }
0.4.21