You need to implement one of the following mint methods and add the Element launchpad contract to the PartnerList[]. This will allow the element launchpad contract to mint ERC721 NFTs to the user's address.
Note that the mint method name can be changed to another one according to your requirements, as long as the parameter list is consistent.
/// @dev Mint an erc721 to the user address.
/// @param to The user address.
/// @Note The method name can be changed to another one, but the parameters cannot be modified.
function mintMethod1(address to) external {
// Check if the msg.sender is in the partner list.
require(_inPartnerList[msg.sender], "minter not allowed");
// Your other codes.
// ...
// Mint erc721.
_mint(to, _getTokenId());
}
/// @dev Mint erc721s to the user address.
/// @param to The user address.
/// @param amount The quantity purchased by the user.
/// @Note The method name can be changed to another one, but the parameters cannot be modified.
function mintMethod2(address to, uint256 amount) external {
// Check if the msg.sender is in the partner list.
require(_inPartnerList[msg.sender], "minter not allowed");
// Your other codes.
// ...
// Mint erc721s.
for (uint256 i; i < amount; i++) {
_mint(to, _getTokenId());
}
}