ERC777Mock.sol 815 B

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity >=0.6.0 <0.8.0;
  3. import "../GSN/Context.sol";
  4. import "../token/ERC777/ERC777.sol";
  5. contract ERC777Mock is Context, ERC777 {
  6. constructor(
  7. address initialHolder,
  8. uint256 initialBalance,
  9. string memory name,
  10. string memory symbol,
  11. address[] memory defaultOperators
  12. ) public ERC777(name, symbol, defaultOperators) {
  13. _mint(initialHolder, initialBalance, "", "");
  14. }
  15. function mintInternal (
  16. address to,
  17. uint256 amount,
  18. bytes memory userData,
  19. bytes memory operatorData
  20. ) public {
  21. _mint(to, amount, userData, operatorData);
  22. }
  23. function approveInternal(address holder, address spender, uint256 value) public {
  24. _approve(holder, spender, value);
  25. }
  26. }