List Rarible Lazy Minted Tokens on OpenSea - solidity

How can I list Rarible Lazy Minted off-chain tokens on OpenSea?
I am Lazy Minting tokens on Rarible that go to a custom smart contract during the sale. Before the sale, the tokens are stored off-chain but still listed on Rarible. How do I get these off-chain tokens to also be listed on OpenSea?
In other words, I need to list off-chain lazy minted tokens on Rarible and OpenSea that mint to a custom smart contract at sale.

Related

How to delete NFT listing if the NFT is transferred out of the owner wallet

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?

OpenSea Lazy Minting with Custom Contract

How can I get OpenSea to lazy mint with a custom contract I built?
In other words, how do I get OpenSea to communicate with my custom contract during the sale of a lazy minted token?
I don’t want the lazy minted token to show up on the OpenSea smart contract. I want it to live on my custom contract after purchase.

Solidity openzeppelin public mint ERC721 token function, is any arguments really neccessary? [duplicate]

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.

How do I modify my smart contract code so I'm the only one who can sell tokens? Everyone else send their tokens to me to exchange for either ETH, etc

So I have a token that has about 103 users. What I need to do is restrict the ability to sell those tokens to just myself the developer, so the other users can redeem their tokens for ETH or MATIC by sending to me. The alternative would be to just write a new smart contract, including this function and moving all users to the new platform. How would I write that new contract?
The first, you can't change code of deployed contract in Ethereum.
The second, look at ERC-20 and ERC-721 (NFT) standarts, its already have functionality you need.

what's the purpose of the approve function in erc 20

I'm new in solidity and erc20, so I read ERC20 description on the openzeppelin and find this function which isn't clear for me.
approve(spender, amount)
What's the purpose of allowing to the spender spend my token, instead of send my tokens to the spender directly?
You can change the approved amount or revoke it altogether (only the unspent amount). But you cannot take back an already sent transfer.
A common use case for the approve() function is trading on a DEX (decentralized exchange). You approve the DEX contract address to spend your USDT tokens for example. And when you want to buy an XYZ token (against USDT), the DEX simply pulls the already approved USDT from your address and sends you the XYZ tokens.
Approve is a function used to give permission the spender can be anyone an exchange or EOA to withdraw as many times from your token contract up to the _value.
You can check this reference here
As others said, Approve function can give permission to the spender to pulls the amount of token in your address. It can be used in: DEX (decentralized exchange) or in Custody services.
In custody services, after you approve the custody provider to take your token, whenever your wallet receives token, the custody provider is able to transfer your token into some internal wallets and keep them save for you. (It's just like how the traditional banks work)