Sewmina 6 months ago
parent
commit
fc1db76733
1 changed files with 7 additions and 0 deletions
  1. 7 0
      GameData.sol

+ 7 - 0
GameData.sol

@@ -87,6 +87,12 @@ contract GameData is ERC1155, Ownable, ERC1155Burnable {
 
     //----------User Management--------------------/
 
+    uint256[] public userMintedIds;
+    function GetUserMintedIds() public view returns(uint256[] memory){
+        return userMintedIds;
+    }
+
+
     function GetCurrentUserIndex() public view returns(uint256){
         return nextUserId;
     }
@@ -95,6 +101,7 @@ contract GameData is ERC1155, Ownable, ERC1155Burnable {
         require(msg.sender == operator || msg.sender == owner(), "Only the operator can do this");
 
         _mint(newUserAddress, newUserId, 1, "");
+        userMintedIds.push(newUserId);
         nextUserId++;
     }
     //------------------------------/