-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to put each NFT for sale while we're minting #24
Comments
did you find the sol code? |
To set them for sale (listing) while minting? No. |
Oh, not that but the sol code for the smart contract? |
This is my code: // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
// import "../utils/Base64.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
contract bulk_nft is ERC1155, Ownable {
using SafeMath for uint256;
using Base64 for bytes;
string private baseURI;
string public name;
string private _contractURI = "https://.....ipfs...path...to.../collection.json";
constructor() ERC1155("https://ipfs...path....to..../metadata/{id}.json") {
setName("Collection Name Here");
// endd - startt + 1 = total number of files
uint startt = 1;
uint endd = 2;
for (uint i = startt; i <= endd; i++) {
_mint(msg.sender, i, 1, "");
}
}
function setURI(string memory _newuri) public onlyOwner {
_setURI(_newuri);
}
function setName(string memory _name) public onlyOwner {
name = _name;
}
function setContractURI(string memory contractURI_) public onlyOwner() {
_contractURI = string(abi.encodePacked(
"data:application/json;base64,",
Base64.encode(
bytes(
contractURI_
)
)
));
}
// // for opensea collection
// function contractURI() public pure returns (string memory) {
// return _contractURI;
// }
function contractURI() public view returns (string memory) {
return _contractURI;
}
} |
hi , im just setup and run molaris server in my pc and connect it to my metamask , now how to ment nft ? and how to run minter-nft ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1- How to upload NFTs to an existing collection?
2- How to put each NFT for sale while we're uploading?
The text was updated successfully, but these errors were encountered: