thaddeusdiamond/cardano-nft-vending-machine

[Question] Modification needed for free mint

Closed this issue · 2 comments

dsv9 commented

As per documentation, the below line specifies the price and donation of the nft in lovelace with the mention both prices can be 0

# The Mint object below represents your Mint policy and specifies price, and donation in Lovelace (both can be 0) mint = Mint('<POLICY_ID>', 10000000, 1000000, '/path/to/nft/json/metadata', '/path/to/mint/script', '/path/to/mint.skey', whitelist)

If both are set to 0, what needs to be done in order for the vending machine to return the required min 1 ADA the user has to put forward in order for the transaction to go through and return its tokens?

Also, what is lovelace donation ?

The user will send in ADA and it will get automatically returned with the NFT less chain fees during a free mint. The profit address will be excluded from the minting transaction.

If they send too little ADA to be returned per minUTxO calculations then it will be "exiled" and needs the operator to manually refund (this is to avoid a DoS attack with tons of small payments during a hyped mint that would cause failed Blockfrost interactions).

lovelace donation is a donation in lovelace (so 1000000 there would be 1 ADA). It's not required, it just goes to the developer if you choose, otherwise you can set it to 0.

dsv9 commented

thanks 🙌