Skip to content

Mint and Sell NFTs Contract ​

View the code on Github ​
View all contracts on Github ​

This contract mints non-fungible tokens and creates a selling contract instance to sell the tokens in exchange for some sort of money.

startInstance() returns a creatorFacet with a .sellTokens() method. .sellTokens() takes a specification of what is being sold, such as:

{
  customValueProperties: { ...arbitrary },
  count: 3,
  moneyIssuer: moolaIssuer,
  sellItemsInstallation,
  pricePerItem: AmountMath.make(moolaBrand, 20n),
}

The offerResult is a record with useful properties such as the creatorFacet for the sales contract. You can reuse the creatorFacet of this contract to mint more batches of NFTs, for example more tickets for a separate show.