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

Dynamic NFT mint fee pricing via hook #13

Open
jdubpark opened this issue Jul 1, 2024 · 0 comments
Open

Dynamic NFT mint fee pricing via hook #13

jdubpark opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jdubpark
Copy link

jdubpark commented Jul 1, 2024

Description and context

Currently, the minting fee is static for all NFT mints. SPGNFT doesn't support dynamic NFT mint pricing, such as the bonding curve or Dutch auction. We can explore supporting dynamic mint pricing to unlock new use cases without writing a bespoke NFT contract. Eventually, we can also write hooks for the community to use without writing a Hook contract as well.

Suggested solution

  1. Add a hook interface with supplied parameters (for the hook to use, such as the mint amount and msg.sender). This hook should return a value (minting fee) that SPGNFT can use to collect. In case of a failure, the minting should revert.
  2. createCollection accepts a parameter nftPricingHook, which is the hook to call on each _mintToken call. If set to zero address, the static parameter mintFee is used for the minting cost.
@jdubpark jdubpark added the enhancement New feature or request label Jul 1, 2024
@jdubpark jdubpark self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant