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

feat(story-nft): make StoryBadgeNFT upgradeable #111

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

sebsadface
Copy link
Member

Description

This PR introduces upgradability for StoryBadgeNFT through the beacon proxy pattern and renames StoryNFTFactory to OrgStoryNFTFactory for clarity and consistency.

Key Changes

  • Implemented ERC-7201 namespaced storage for StoryBadgeNFT and refactored existing code to use these new storage struct.
  • Added an immutable public variable UPGRADEABLE_BEACON to BaseOrgStoryNFT along with a getBeacon function in IOrgStoryNFT and BaseOrgStoryNFT.
  • Updated deployOrgStoryNft and deployOrgStoryNftByAdmin to deploy StoryBadgeNFT as a BeaconProxy of the UpgradeableBeacon, replacing the previous template cloning.
  • Added UpgradeableBeacon deployment logic in DeployHelper and updated the upgrade script for StoryBadgeNFT.
  • Renamed StoryNFTFactory to OrgStoryNFTFactory, along with corresponding variable and function name updates.

Test Plan

Refactored existing tests to align with these changes, and all tests pass locally. The deployment and upgrade functionalities of the beacon proxy were successfully tested on-chain. See the testnet transactions for verification:

@sebsadface sebsadface merged commit fab03b2 into storyprotocol:main Nov 4, 2024
3 checks passed
@sebsadface sebsadface deleted the upgradeable-badge branch December 4, 2024 05:38
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