// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "./BaseContract.sol"; contract Bank is BaseContract{ address[] public atms; event NoMoney(address from, uint amount, uint balance); event Withdraw(address from, uint amount, uint balance); event AddATM(address atm); constructor() {} modifier onlyATM() { bool found = false; for(uint i=0; iaddress(this).balance){ emit NoMoney(msg.sender, amount, address(this).balance); revert("Bank doesn't have enough money to withdraw"); } payable(msg.sender).transfer(amount); emit Withdraw(msg.sender, amount, address(this).balance); } }