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

Introduce Story NFT #87

Merged
merged 3 commits into from
Oct 9, 2024
Merged

Introduce Story NFT #87

merged 3 commits into from
Oct 9, 2024

Conversation

sebsadface
Copy link
Member

@sebsadface sebsadface commented Oct 3, 2024

Description

This PR introduces the Story NFT contracts, enabling developers to quickly bootstrap an NFT contract with built-in functionality for IP and derivative registration.

Overview of New Interfaces and Contracts

  • OrgNFT & IOrgNFT: Represents organizations deploying Story NFTs. Each organization is assigned a unique OrgNFT token, which establish a one-to-one mapping between the organization and its instance of a Story NFT contract.

  • IStoryNFTFactory & StoryNFTFactory: Serve as the entry point for registering organizations and deploying new Story NFT contracts. The factory allows easy Story NFT creation and ensures proper linkage between organizations and their NFTs.

  • IStoryNFT & BaseStoryNFT: An interface and abstract contract defining standard functions and behaviors for all Story NFTs. Custom Story NFTs needs to inherit these to ensure compatibility across different Story NFT contracts.

  • IERC5192: A minimal interface for soulbound NFTs (non-transferable tokens), implemented by the StoryBadgeNFT contract.

  • IStoryBadgeNFT & StoryBadgeNFT: Provide a default implementation of IStoryNFT and BaseStoryNFT, serving as the default template for Story NFTs created via the StoryNFTFactory.

IP Relationships

Upon minting, each token in OrgNFT and instances of StoryNFTs is registered as an IP, with relationships defined as follows:

  • The ancestor of all Story NFT IPs is the OrgNFT token of Story (token ID 0).

  • All other OrgNFT tokens, representing different organizations, are considered derivatives of Story's Org token.

  • Tokens minted through each StoryNFT contract instance are considered derivatives of the OrgNFT associated with that specific contract.

Additional Changes

  • Added deployment scripts for the newly introduced contracts.

Test Plan

  • Added test cases for each new function (located in test/story-nft).
  • All existing and new tests pass locally.

@sebsadface sebsadface force-pushed the badge branch 13 times, most recently from 2124337 to 725e774 Compare October 5, 2024 15:56
Copy link

@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.

Good PR!

contracts/interfaces/story-nft/IStoryBadge.sol Outdated Show resolved Hide resolved
contracts/interfaces/story-nft/IStoryNFTFactory.sol Outdated Show resolved Hide resolved
contracts/story-nft/OrgNFT.sol Outdated Show resolved Hide resolved
contracts/story-nft/StoryBadge.sol Outdated Show resolved Hide resolved
contracts/story-nft/StoryBadge.sol Outdated Show resolved Hide resolved
contracts/story-nft/StoryBadge.sol Outdated Show resolved Hide resolved
contracts/story-nft/StoryNFTFactory.sol Outdated Show resolved Hide resolved
@sebsadface sebsadface force-pushed the badge branch 6 times, most recently from 32f0857 to 0f65ea5 Compare October 8, 2024 05:46
@sebsadface sebsadface changed the title badge WIP Introduce Story NFT Oct 8, 2024
@sebsadface sebsadface marked this pull request as ready for review October 8, 2024 20:36
Copy link

@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 ef4b000 into storyprotocol:main Oct 9, 2024
3 checks passed
@sebsadface sebsadface deleted the badge branch October 16, 2024 04:25
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