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

refactor(story-nft): extract OrgNFT logic to BaseOrgStoryNFT #109

Merged
merged 3 commits into from
Nov 2, 2024

Conversation

sebsadface
Copy link
Member

Description

This PR refactors BaseStoryNFT by extracting OrgNFT logic into a newly created child contract, BaseOrgStoryNFT, to enhance modularity and generalizability. Additionally, it introduces ERC-7201-compliant namespaced storage for both BaseStoryNFT and BaseOrgStoryNFT for future upgradability for inheriting contracts.

Key Changes

  • Removed orgNft, orgTokenId, and orgIpId from BaseStoryNFT’s constructor and initializer.
  • Introduced BaseOrgStoryNFT as a child contract of BaseStoryNFT, incorporating orgNft, orgTokenId, and orgIpId in its constructor and initializer, with relevant getters added.
  • Implemented ERC-7201-compliant namespaced storage for both BaseStoryNFT and BaseOrgStoryNFT, including internal and external initializers.
  • Updated BaseStoryNFT to inherit from OpenZeppelin’s upgradable contracts.

Test Plan

Refactored existing Story NFT test cases, all tests pass locally.

@sebsadface sebsadface changed the title refactor(story-nft): factor out OrgNFT logic in BaseStoryNFT refactor(story-nft): extract OrgNFT Logic to BaseOrgStoryNFT Nov 1, 2024
@sebsadface sebsadface changed the title refactor(story-nft): extract OrgNFT Logic to BaseOrgStoryNFT refactor(story-nft): extract OrgNFT logic to BaseOrgStoryNFT Nov 1, 2024
Copy link
Collaborator

@kingster-will kingster-will left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sebsadface sebsadface merged commit bad5d7b into storyprotocol:main Nov 2, 2024
3 checks passed
@sebsadface sebsadface deleted the new-base-story-nft 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