ERC20Mock.sol 893 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../token/ERC20/ERC20.sol";
  4. // mock class using ERC20
  5. contract ERC20Mock is ERC20 {
  6. constructor(
  7. string memory name,
  8. string memory symbol,
  9. address initialAccount,
  10. uint256 initialBalance
  11. ) payable ERC20(name, symbol) {
  12. _mint(initialAccount, initialBalance);
  13. }
  14. function mint(address account, uint256 amount) public {
  15. _mint(account, amount);
  16. }
  17. function burn(address account, uint256 amount) public {
  18. _burn(account, amount);
  19. }
  20. function transferInternal(
  21. address from,
  22. address to,
  23. uint256 value
  24. ) public {
  25. _transfer(from, to, value);
  26. }
  27. function approveInternal(
  28. address owner,
  29. address spender,
  30. uint256 value
  31. ) public {
  32. _approve(owner, spender, value);
  33. }
  34. }