with all the tutorial I found there is smart contract which mint nfts and we can see those open sea
but how I list ERC1155 nft because I have 5000 generative NFT and I don’t want to add pricing to each one of them and list them using open sea
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol';
contract TradeNFT {
mapping(address => mapping(uint256 => Listing)) public listings;
struct Listing {
uint256 price;
address seller;
}
function addListing(uint256 price,address contractAddress,uint256 tokenId) public {
ERC1155 token = ERC1155(contractAddress);
require(token.balanceOf(msg.sender,tokenId) > 0 , "caller must own given token");
require(token.isApprovedForAll(msg.sender,address(this)),"contract must be approved");
listings[contractAddress][tokenId] = Listing(price,msg.sender);
}
}
I uses this code but Still after 3 hours my Nfts were not listed in opensea