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

fix(story-nft): enforce max balanceOf() of 1 for each address #183

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

sebsadface
Copy link
Member

Description

This PR enhances security in the StoryBadgeNFT and OrgStoryNFTFactory contracts by adding additional validation checks to prevent duplicate minting scenarios.

For StoryBadgeNFT, we now verify that a recipient can only hold one badge NFT by checking their balance before minting, regardless of signature changes. Similarly for OrgStoryNFTFactory, we validate that an organization NFT recipient doesn't already have an NFT before deployment.

These changes are accompanied by new error types (StoryBadgeNFT__RecipientAlreadyHasBadge) and test cases to verify the updated behavior.

@sebsadface sebsadface merged commit eaf3df5 into storyprotocol:main Feb 12, 2025
10 checks passed
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