Hi all,
This might be the start of a longer discussion so I’ll just start by saying that I’ve read through the docs (very helpful) and deployed an ERC 721 contract on Manifold studio.
The goal is to create a site where users are able to upload audio to IPFS on our site (already done) and mint their own uploads as an NFT. Eventually I would like to attach additional functionality to the NFTs to help the creator of the audio file make some money. (this might be in the form of staking, royalties, or advertising)
I just want to be sure that I’m doing this right. I believe I want to deploy the 721 lazy mint extension as discussed here: Lazy Mint Extension ERC721 | Manifold for Developers | Manifold Docs
I deployed the 721 contract from Manifold studio, however it is not possible to simply deploy the following from remix:
Does anyone have experience with this step?
TypeError: No arguments passed to the base constructor
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @author: manifold.xyz
import “@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol”;
import “@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol”;
import “@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol”;
import “@openzeppelin/contracts/token/ERC721/IERC721.sol”;
import “@openzeppelin/contracts/utils/Strings.sol”;
import “@openzeppelin/contracts/utils/introspection/ERC165.sol”;
contract FlutNFTExt is AdminControl, ICreatorExtensionTokenURI {
using Strings for uint256;
address private _creator;
string private _baseURI;
constructor(address creator) {
_creator = creator;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, IERC165) returns (bool) {
return interfaceId == type(ICreatorExtensionTokenURI).interfaceId || AdminControl.supportsInterface(interfaceId) || super.supportsInterface(interfaceId);
}
function mint() public {
IERC721CreatorCore(_creator).mintExtension(msg.sender);
}
function setBaseURI(string memory baseURI) public adminRequired {
_baseURI = baseURI;
}
function tokenURI(address creator, uint256 tokenId) external view override returns (string memory) {
require(creator == _creator, "Invalid token");
return string(abi.encodePacked(_baseURI, tokenId.toString()));
}
}