ERC20WrapperHarness.sol 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.20;
  3. import {ERC20Permit} from "../patched/token/ERC20/extensions/ERC20Permit.sol";
  4. import {ERC20Wrapper, IERC20, ERC20} from "../patched/token/ERC20/extensions/ERC20Wrapper.sol";
  5. contract ERC20WrapperHarness is ERC20Permit, ERC20Wrapper {
  6. constructor(
  7. IERC20 _underlying,
  8. string memory _name,
  9. string memory _symbol
  10. ) ERC20(_name, _symbol) ERC20Permit(_name) ERC20Wrapper(_underlying) {}
  11. function underlyingTotalSupply() public view returns (uint256) {
  12. return underlying().totalSupply();
  13. }
  14. function underlyingBalanceOf(address account) public view returns (uint256) {
  15. return underlying().balanceOf(account);
  16. }
  17. function underlyingAllowanceToThis(address account) public view returns (uint256) {
  18. return underlying().allowance(account, address(this));
  19. }
  20. function recover(address account) public returns (uint256) {
  21. return _recover(account);
  22. }
  23. function decimals() public view override(ERC20Wrapper, ERC20) returns (uint8) {
  24. return super.decimals();
  25. }
  26. }