// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract ERC20Mock is ERC20 { event Deposit(address indexed dst, uint256 wad); event Withdrawal(address indexed src, uint256 wad); constructor( string memory name, string memory symbol, uint256 supply ) ERC20(name, symbol) { _mint(msg.sender, supply); } receive() external payable { deposit(); } function deposit() public payable { _mint(msg.sender, msg.value); emit Deposit(msg.sender, msg.value); } function withdraw(uint256 wad) public { _burn(msg.sender, wad); payable(msg.sender).transfer(wad); emit Withdrawal(msg.sender, wad); } }