BaseNFT interfaces and helper contracts #19
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change lays out the beginning steps to define a base layer of contract interfaces to make creating contracts easier. There are three contracts so far:
BaseNFT
- Defines interfaces that extendNonFungibleToken.Collection
andNonFungibleToken.NFT
. These interfaces remove as much boilerplate code as they can from the concrete implementations ofCollection
andNFT
that a creator would need to define.NFTMetadata
- A contract that defines types to more easily contain and vend metadata.BaseNFTVars
- A small contract interface to define pre-set variables that must be on a contract definition. These variables are used byBaseNFT
to allow default implementations of metadata viewsWhat we still need:
OpenEditionNFT
definition. But we will need to abstract some logic away into interfaces so that we can define ways to mint (sequential, random, etc.) while also removing more duplicate code from contracts we generate