I'm facing a challenge with my NFT marketplace project. How I can create NFTs with the rule that those NFTs can only be sold on our own platform but others. Technically is possible, however, I need some help here.
Thank you.
Yes this possible For that you have to maintain a mapping or some sort of logic on smart contract level to keep track of whether to and from address belong to your ERC 721 contract or not.
transferFrom(from, to, tokenId)
Like when someone mints NFT on your smart contract you can save the address of the minter. And at the time of selling of you can have a condition at the start of transferFrom like.
require(to == exists[to], "Warning, You are selling outside of the contract")
mapping can be something of like this. mapping(address => address) exists;
Related
I'm working on a project to create an NFTs marketplace.
When an NFT is listed, the owner can transfer that NFT to another wallet and the listing would still be there.
This raises a few problems:
When the NFT is returned to the original, the listing is up again and bots can snipe the NFT if the listing is below the floor price.
Buyers can still call the function but the transaction will be reverted, buyers would receive no NFT and lose the gas fee.
Apparently, Opensea is fighting this problem using front-end solution. CMIIW.
You can see more below:
https://opensea.io/blog/safety-security/important-updates-for-listing-and-delisting-your-nfts/
https://support.opensea.io/hc/en-us/articles/4415742560403-What-is-an-inactive-listing-
Are there any other ways for the smart contracts to recognize the NFT being transferred out of the wallet and make the listing invalid, only using smart contracts?
I'm trying to build an NFT marketplace. So I wanted to create an ERC1155 smart contract to allow content creators to put their art into the smart contract. I'm using OpenZeppelins wizard as a base but I found some weirdness on the mint function. It's allowing only the owner of the contract to mint:
It's made me suspicious about my actions. Should I disallow users to mint to create items on my contract?
I can't speak for the wizard authors why they decided on some specific approach.
However it's an established practice that when an artist or any other authorized person publishes an NFT collection, they don't want other people to contribute to this specific collection and change the overall meaning of it. For example, if you have a collection of NFTs representing pictures of dogs, you might not want other people to create NFTs representing pictures of cats in the same collection. Or any other unrelated pictures for that matter.
If you want to allow minting tokens in the collection by anyone, you can remove the onlyOwner modifier from the mint functions As well as the Ownable extension of MyTokens contract and its import, assuming you don't use the Ownable features elsewhere in your contract.
I'm looking into adding a function to allow payments by cc during mint. Has anyone done this successfully and is willing to share how you went about it? Thanks!
The only way for doing this is after user paying you need to make the minting from your server and transfer it to the user or mint it directly to the user wallet
I have my contract in solidity for my NFT collection. Usually people are minting from contract from first to last piece. Is it possible that they will mint only one exact piece? I mean something like reservation. Can I store this reservation list somewhere for example it will be address and number of image:
"0x62e4613BBA89f81F8ea6f286eC4c3d7e6896509e": 4
so user with address 0x62e4613BBA82f81F8ea6f686eC4c3d7e6896509e will be minting 4th element of the collection. He cannot mint any other but he can mint whenever he wants. Is it even possible? Can I pass any argument to mint method that will mint exact piece from whole collection?
well, is technically possible, maybe with some mappings, requires and that, but maybe will be more hard to know exactly how much nft have been minted or what nft have already been minted, but you can have a mapping of address to an array of uint where the address is the user address and in the array of uint will be the tokenId that are reserved to that address, and another mapping of uint to addres, where the uint is the token id and the address is the user address and you can use it to know if that token id is already reserved or minted
I'm creating a new token in BSC using Solidity, and I want to identified when someone is buying, so I can make the contract do something specific
How can I identified when someone is BUYING? thanks