Skip to content
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

[nft-collection N-06] Variables Initialized With Their Default Values #1638

Open
wants to merge 1 commit into
base: fix/nft-collection-audit-N-03
Choose a base branch
from

Conversation

adjisb
Copy link
Contributor

@adjisb adjisb commented Jan 28, 2025

Description

https://internal-jira.atlassian.net/browse/GE-100

Audit

Within NFTCollection.sol, multiple instances of variables being initialized with their default values were identified:

The i variable in the safeBatchTransferFrom function
The i variable in the batchTransferFrom function
To save gas, consider not initializing variables with their default values.

Fixes

Fixes, removed the initialization.

@adjisb adjisb requested a review from a team as a code owner January 28, 2025 14:37
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-05 branch from 564156e to acff357 Compare January 29, 2025 14:15
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-06 branch from 6d1e4c1 to e389954 Compare January 29, 2025 14:15
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-05 branch from acff357 to cd2cb6b Compare January 29, 2025 14:55
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-06 branch from e389954 to 98479d8 Compare January 29, 2025 14:56
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-05 branch from cd2cb6b to 98da5be Compare January 29, 2025 16:12
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-06 branch from 98479d8 to 859b5b9 Compare January 29, 2025 16:13
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-05 branch from 98da5be to 7d403af Compare January 31, 2025 12:06
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-06 branch from 859b5b9 to f48ab45 Compare January 31, 2025 12:07
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-05 branch from 7d403af to 2a51453 Compare February 3, 2025 13:41
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-06 branch from f48ab45 to d43c6c3 Compare February 3, 2025 14:15
@adjisb adjisb force-pushed the fix/nft-collection-audit-N-06 branch from d43c6c3 to 6059d50 Compare February 3, 2025 16:31
@adjisb adjisb changed the base branch from fix/nft-collection-audit-N-05 to fix/nft-collection-audit-N-03 February 3, 2025 16:31
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.

2 participants