Mint Mechanics
Last updated
Last updated
The MintManager itself facilitates fixed priced public sales in which you can add basic information like a payment recipient, a max supply, a max per wallet, etc. It also supports gated signature-based sales, which allows Highlight to validate gate access offchain and then process mints on chain.
But beyond that, developers can also write their own custom mint mechanics. Mint mechanics can be crafted to produce highly tailored sales experiences. Highlight's own ranked auction and Dutch auction formats are powered by mint mechanics. Others have produced custom mint mechanics to accomplish things like running their own off chain servers to process mint logic, use their own credit card payment system, sign transactions, and then execute mints.
Mint mechanics have functions that are inserted as hooks into the mint managers, and are run before minting can occur. This means you can decide for yourself, in your own mechanic, what sale logic to process. Once the mechanic's mint logic is processed, the mint will proceed successfully. In these cases, the only check run in our mint manager is the check to verify that the appropriate Highlight fee of .0008 ETH has been paid.
Every custom mechanic has a simple interface to adhere to, with three core methods: createVector
(all mechanics use a global ID system, and you call createVector to create one and register it), processNumMint
(a hook where your custom logic happens, all we do is validate that fee was paid and then we execute), processChooseMint
(the same kind of hook but for collectors' choice series).
Finally, note that your custom mechanic can receive arbitrary data passed in from the mint manager as the final parameter, allowing you to pass in custom data that you can process inside your mechanic.
The arbitrary data parameter in all three functions (createVector
, processNumMint
, processChooseMint
) is the key to implementing highly customizable sale logic in your mechanic.