ERC20NoReturnMock.sol 869 B

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.20;
  3. import {ERC20} from "../../token/ERC20/ERC20.sol";
  4. abstract contract ERC20NoReturnMock is ERC20 {
  5. function transfer(address to, uint256 amount) public override returns (bool) {
  6. // forge-lint: disable-next-line(erc20-unchecked-transfer)
  7. super.transfer(to, amount);
  8. assembly {
  9. return(0, 0)
  10. }
  11. }
  12. function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
  13. // forge-lint: disable-next-line(erc20-unchecked-transfer)
  14. super.transferFrom(from, to, amount);
  15. assembly {
  16. return(0, 0)
  17. }
  18. }
  19. function approve(address spender, uint256 amount) public override returns (bool) {
  20. super.approve(spender, amount);
  21. assembly {
  22. return(0, 0)
  23. }
  24. }
  25. }