ERC6909GameItems.sol 822 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.20;
  3. import {ERC6909Metadata} from "../../../../token/ERC6909/extensions/draft-ERC6909Metadata.sol";
  4. contract ERC6909GameItems is ERC6909Metadata {
  5. uint256 public constant GOLD = 0;
  6. uint256 public constant SILVER = 1;
  7. uint256 public constant THORS_HAMMER = 2;
  8. uint256 public constant SWORD = 3;
  9. uint256 public constant SHIELD = 4;
  10. constructor() {
  11. _setDecimals(GOLD, 18);
  12. _setDecimals(SILVER, 18);
  13. // Default decimals is 0
  14. _setDecimals(SWORD, 9);
  15. _setDecimals(SHIELD, 9);
  16. _mint(msg.sender, GOLD, 10 ** 18);
  17. _mint(msg.sender, SILVER, 10_000 ** 18);
  18. _mint(msg.sender, THORS_HAMMER, 1);
  19. _mint(msg.sender, SWORD, 10 ** 9);
  20. _mint(msg.sender, SHIELD, 10 ** 9);
  21. }
  22. }