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

Add support for dynamic and nested NFTs #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aniket2405
Copy link

@aniket2405 aniket2405 commented Mar 22, 2023

  1. The modified contract introduces a new NftType enum to differentiate between static, dynamic, and nested NFTs. The NftData struct contains the new fields nftType, parentId, and childIds to support dynamic and nested NFTs.
  2. The createStaticNft function creates a new static NFT with the specified recipient and token ID.
  3. The createDynamicNft function creates a new dynamic NFT with a new token ID and the specified recipient.
  4. The createNestedNft function creates a new nested NFT with a new token ID, the specified recipient, and the parent NFT ID. It also adds the child NFT ID to the childIds array of the parent NFT.
  5. The getChildNfts function returns an array of child NFT IDs for a given parent NFT ID. (used to retrieve child NFTs for the nested NFTs)

@aniket2405
Copy link
Author

@mbcse, modified the contract to support dynamic and nested NFTs.

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.

1 participant