Skip to content

Dynamic NFT mint fee pricing via hook #13

@jdubpark

Description

@jdubpark

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions