// SPDX-License-Identifier: UNLICENSED // Gearbox Protocol. Generalized leverage for DeFi protocols // (c) Gearbox Holdings, 2022 pragma solidity ^0.8.10; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract ERC20BlockingMock is ERC20, Ownable { bool public isBlocked; constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) { _mint(msg.sender, 1e24); isBlocked = false; } function blockToken() external { isBlocked = true; } function mint(address to, uint256 amount) external onlyOwner { _mint(to, amount); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return !isBlocked; } }