Skip to content

Commit

Permalink
ERC721: Use local variable to increment state variable
Browse files Browse the repository at this point in the history
Signed-off-by: Jagadish Krishnamoorthy <jagdish.krishna@gmail.com>
  • Loading branch information
jaglinux committed Dec 29, 2022
1 parent 504a9c8 commit 4ea3521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tokens/ERC721.vy
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def safe_mint(owner: address, uri: String[432]):
# New tokens will be automatically assigned an incremental ID.
# The first token ID will be zero.
token_id: uint256 = self._counter
self._counter += 1
self._counter = token_id + 1
# Theoretically, the following line could overflow
# if all 2**256 token IDs were minted. However,
# since we have bounded the dynamic array `_all_tokens`
Expand Down

0 comments on commit 4ea3521

Please # to comment.