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

BaseNFT interfaces and helper contracts #19

Merged
merged 8 commits into from
Jul 31, 2024
Merged

BaseNFT interfaces and helper contracts #19

merged 8 commits into from
Jul 31, 2024

Conversation

austinkline
Copy link
Contributor

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:

  1. BaseNFT - Defines interfaces that extend NonFungibleToken.Collection and NonFungibleToken.NFT. These interfaces remove as much boilerplate code as they can from the concrete implementations of Collection and NFT that a creator would need to define.
  2. NFTMetadata - A contract that defines types to more easily contain and vend metadata.
  3. BaseNFTVars - A small contract interface to define pre-set variables that must be on a contract definition. These variables are used by BaseNFT to allow default implementations of metadata views

What we still need:

  1. There needs to be a better way to initialize contracts, the init function is ~50% of our OpenEditionNFT definition now. If we can make those inputs, we can remove the majority of the setup needed to get working.
  2. A universal collection implementation. This collection should only allow one type of NFT in it so that things do not get confused/overridden with other types, but can still be used to remove code from a creator's code
  3. A way to remove Minter boilerplate code. Currently the Minter interface defined in our drops is unchanged in our 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
  4. A contract factory that can be given a contract name and the type of contract it should be (probably based on what it should inherit), and makes a new NFT collection fully configured and ready to begin the minting process
  5. A contract manager which helps a creator access contracts while not requiring them to exist on the creator's account itself. It should delegate access, instead.

@austinkline austinkline changed the title [WIP] BaseNFT interfaces and helper contracts BaseNFT interfaces and helper contracts Jul 31, 2024
@austinkline austinkline merged commit 54a12b2 into main Jul 31, 2024
1 check passed
@austinkline austinkline deleted the base-nft branch July 31, 2024 00:11
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