You want your token to have fixed max supply (NFT is just token with 1 max supply).
Invalidate the mint script after some slot number, then we can be sure no more new tokens can be minted after that.
Mint script:
{
"type": "all",
"scripts":
[
{
"type": "before",
"slot": SLOT_NUMBER
},
{
"type": "sig",
"keyHash": "KEY_HASH"
}
]
}
The creator mint the max supply number of tokens before SLOT_NUMBER
. Further token distribution logic can be encoded into the receipient address.
You want to lock newly minted tokens until some time later.
Always mint the tokens into an address guarded by both signature and time.
Distribute token to mass users directly is very costly in Cardano because of UTxO model, you'll need to pay lots of money for those minimal ada required for UTxOs. So we have to find another way.
-
Find your airdrop target from current total UTxO set on chain, apply some criteria you like, for example
ada >= 10
. -
Build the token transfer transaction for each recipient like this (send 100 token to recipient):
inputs: token_distributor, a token recipient, b lovelace outputs: token_distributor, (a - 100) token recipient, b lovelace + 100 token - tx fee
-
Add witness for
token_distributor
. -
Package all the transactions and publish them somewhere, could publish to on chain metadata if the package is not too big.
-
User find the airdrop event and download the package, find the relevant transactions, sign and submit those transactions to receive the tokens. A wallet can automate these steps.