Create a drop
To create a drop you will need to have a collection deployed and connect this collection to the drop system in the dashboard (opens in a new tab).
Smart contract requirements
The Liteflow Infrastructure requires the smart contract to implement at least a mint function and an optional minted function with specific inputs and outputs.
Mint function
This function will be called by the user. It must mint and transfer the token to the user.
The function must be payable
for paid mint and can have up to two arguments:
Type | Description |
---|---|
int (int8 , ..., int256 ) or uint (uint8 , ..., uint256 ) | Number of token to mint |
address | Optional. Address that will receive the token |
The int
and address
arguments are not required but is strongly advised. If the function doesn't implement it, it will be omitted when generating the user transaction.
Here is examples of compatible function:
function mint(address to, uint256 quantity) public payable
function mint(uint256 quantity, address to) public payable
function freeMint() public
function mintWithERC20() public
function mintToMsgSender(uint8 numberToMint) public payable
Liteflow Infrastructure does not enforce any check on the blockchain during the execution of the transaction.
It is the responsibility of the collection as contract developer to enforce any checks you seem necessary.
Minted function
This function must return the number of tokens minted by this drop.
The function must be a view
, have no inputs
, and must return a unique output of type int
or uint
.
Here is examples of compatible function:
function mintCounter() view returns (uint8)
function totalSupply() view returns (uint256)
If you plan to do only one public drop, then the function totalSupply() view returns (uint256)
could be enough.
This function is not required but strongly advised in order to display and properly calculate the remaining number of token that can be minted.
If not set, the Liteflow Infrastructure will use the number of tokens created between the start date and the end date of the Drop which may result in inconsistencies.
Minted by wallet function
This function must return the number of tokens minted by a specific wallet during this drop.
The function must be a view
, have one input
type address
, and must return a unique output of type int
or uint
.
Here is examples of compatible function:
function mintByWalletCounter(address minter) view returns (uint8)
function balanceOf(address owner) view returns (uint256)
If you plan to do only one public drop, then the function balanceOf(address owner) view returns (uint256)
could be enough.
This function is not required but strongly advised in order to display and properly calculate the remaining number of token that can be minted.
If not set, the Liteflow Infrastructure will use the number of tokens created between the start date and the end date of the Drop which may result in inconsistencies.