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

Create a more complete demo-nft-module with collections, metadata uri, freezing, updates, supply #850

Merged
merged 49 commits into from
Sep 22, 2023

Conversation

dubbelosix
Copy link
Contributor

Overview

demo-nft-module has been enhanced to include the concept of Collections, NFTs and calls to create, modify, freeze collections and NFTs and to transfer NFTs. Existing demo-nft-module has been moved to simple-nft-module since it still serves as a very simply and easy to understand tutorial. simple-nft-module focuses more on the sovereign-sdk usage aspects, while demo-nft-module aims to be a more ready implementation to plug-n-play and customize if necessary

Changes

  • demo-nft-module has no genesis
  • README.md added to explain the basic concepts, calls provided as well as example sov-cli commands to interact with the demo-nft-module on a running rollup
  • demo-nft-module has also been added to runtime, so it would be a permanent module

Further changes

The offchain component for indexing the NFTs into an offchain store will be part of a second PR.

Test cases added

  • Create Collection
  • Mint NFT to created collection
  • Mint NFT to non-existent collection
  • Update a collection
  • Freeze a non existent collection
  • Freeze Collection
  • Update collection uri for frozen collection
    • assert that the collection uri hasn't been changed
    • assert that supply hasn't been modified
  • Supply change after minting an NFT to a Collection
  • Minting to a Frozen Collection
    • ensure supply hasn't changed
  • Transferring an NFT from a non-owner address
  • Transferring NFT with non-existent token id
  • Update NFT token_uri
  • Freeze NFT
  • Update NFT token uri for frozen NFT

@dubbelosix dubbelosix requested a review from bkolad September 15, 2023 12:45
Copy link
Member

@preston-evans98 preston-evans98 left a comment

Choose a reason for hiding this comment

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

Looks really good overall. Left a couple of notes about type safety, but just one overall question - how would someone use this to create an NFT drop? It looks like in the current implementation the collection creator has to sign on every individual mint - maybe we should change the interface to have mint which can be called by other modules in addition to the current function mint_from_eoa? The bank follows that pattern.

@dubbelosix
Copy link
Contributor Author

dubbelosix commented Sep 18, 2023

Looks really good overall. Left a couple of notes about type safety, but just one overall question - how would someone use this to create an NFT drop? It looks like in the current implementation the collection creator has to sign on every individual mint - maybe we should change the interface to have mint which can be called by other modules in addition to the current function mint_from_eoa? The bank follows that pattern.

yeah, I agree. we can follow the same pattern, so that way a creator can mint to addresses directly, or the mint can also be created in conjunction with a token that exists in the Bank (will be doing this in a different PR to not make this one too large)

@dubbelosix dubbelosix added this pull request to the merge queue Sep 21, 2023
Merged via the queue into nightly with commit 9cf890f Sep 22, 2023
@dubbelosix dubbelosix deleted the dub/offchain_compute branch September 22, 2023 00:06
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.

3 participants