I'm trying to use the _mintBatch function so that I can have people mint multiple photos in one go. I'm trying to have it so that each photo is unique and only able to me minted once, but I cant get through this function to sort the rest out.
The error I'm getting is:
" ParserError: Expected ',' but got identifier
--> contract.sol:40:36:
40 | _mintBatch(msg.sender, uint[10]photoid, uint[10]amount, "");
| ^^^^^^^
"
Any help with this will be greatly appreciated. Thank you!
Heres the code as well:
pragma solidity ^0.8.7;
import "@openzeppelin/contracts@4.4.0/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts@4.4.0/access/Ownable.sol";
import "@openzeppelin/contracts@4.4.0/security/Pausable.sol";
import "@openzeppelin/contracts@4.4.0/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract nft is ERC1155, Ownable, Pausable, ERC1155Supply {
using SafeMath for uint;
uint256 private supply;
uint256 private rates;
uint256 private minted;
uint[] private mintlog;
constructor() ERC1155("") {
minted = 0;
supply = 10000;
rates = 0.1 ether;
}
function setURI(string memory newuri) public onlyOwner {
_setURI(newuri);
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
function minting(uint[10] memory photoid, uint[10] memory amount) public payable {
_mintBatch(msg.sender, uint[10]photoid, uint[10]amount, "");
}
}