Skip to content

[H-01] Game Passes Audit #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Apr 15, 2025
Merged

[H-01] Game Passes Audit #1654

merged 61 commits into from
Apr 15, 2025

Conversation

wojciech-turek
Copy link
Member

@wojciech-turek wojciech-turek commented Mar 24, 2025

image

The fix involves tracking and updating totalMinted inside the tokenConfig which is incremented before we check if the new amount does not exceed the maxSupply.

@wojciech-turek wojciech-turek requested a review from a team as a code owner March 24, 2025 13:15
@adjisb
Copy link
Contributor

adjisb commented Mar 25, 2025

Consider accumulating in a local variable instead in an extra storage variable to save gas.
You can also call _checkMaxSupply after minting, but, there maybe a chance of reentrancy issues.

@wojciech-turek
Copy link
Member Author

@adjisb

I wanted to follow something similar as in the NFTCollection contract where we store waveTotalMinted.
Vlad was already asking for this information and I actually think it may be useful for them to be able to query it from the blockchain.

The gas cost increase is acceptable since its just storing an extra uint for each token.

wojciech-turek and others added 28 commits April 3, 2025 09:43
@wojciech-turek wojciech-turek merged commit 05a243f into passes-contract Apr 15, 2025
6 checks passed
@wojciech-turek wojciech-turek deleted the passes-audit-h-01 branch April 15, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants