Browse Source

Start tokenId at zero in docs (#3162)

- Fixes #3123
Tim Daubenschütz 3 years ago
parent
commit
28986d2f2e
1 changed files with 1 additions and 2 deletions
  1. 1 2
      docs/modules/ROOT/pages/erc721.adoc

+ 1 - 2
docs/modules/ROOT/pages/erc721.adoc

@@ -30,12 +30,11 @@ contract GameItem is ERC721URIStorage {
         public
         returns (uint256)
     {
-        _tokenIds.increment();
-
         uint256 newItemId = _tokenIds.current();
         _mint(player, newItemId);
         _setTokenURI(newItemId, tokenURI);
 
+        _tokenIds.increment();
         return newItemId;
     }
 }