Cloning OpenSea NFT Boilerplate Questions

@IAmJaysWay

Sorry to disturb but I’m not sure where I’m supposed to put the link to the ipfs metadata in this code. I’m new to solidity.

With this smart contract you will provide the token_uri as an argument to the createToken function that then mints a NFT. So essentially, deploy the contract then paste your ipfs metadata link as an argument to the createToken function and youre NFT will mint, with metadata stored in ipfs, when you run the functoin :+1:

I was able to mint the tokens but the images are not showing on opensea.

However, the old ones I bulk-minted still have their images showing up on opensea

Yes i understand i can load images manually but i want the images to get pulled from opensea as well to be displayed

Thanks for the reply, I have created the sync event on the Moralis server. It appears to detect something when I attempt to list an NFT by adding data instances to classes such as PolygonTransactions. I am just finding that no instances of CreatedMarketItems are created.
image

However, I saw that the columns of the CreatedMarketItems class do not match the ones in the tutorial video. This is because these column names (as shown below) do not show the column names entered into the sync event details. Would this be a likely cause to why it is not working?

I got everything right and I can navigate the marketplace, but cannot buy anything.

I think because I’ve missed the last part. What exactly I have to do here?

:arrows_clockwise: Sync the MarketItemCreated event /src/contracts/marketplaceBoilerplate.sol contract with your Moralis Server, making the tableName MarketItems

Hi, My collection in ethereum-nft-marketplace-boilerplate doesn’t display… its saying this… "No Smart Contract Details Provided. Please deploy smart contract and provide address + ABI in the MoralisDappProvider.js file " How can i fix it? Thank you

Hi,
Thank you for the great work
I couldn’t deploy the smartcontract, I couldn’t find the /src/contracts/marketplaceBoilerplate.sol file, will appreciate your help

Seatea

Hi @ZeusExMachina,

If the CreatedMarketItems class does not auto-populate even after you successfully complete a transaction to list an item using the smart contract, there is most likely something off in your sync event. I would carefully make sure that all the details “selected chain”, “ABI”, “address” and “topic” are correct :slight_smile:

I know it is a bit tedious, but I suggest just executing the list function on Remix and tweaking the sync event until you manage to get the CreatedMarketItems to populate!

@gymvideo, @Tellem1111, @Seatea,

Hey peeps,

Seems like you are all stuck in a similar place, you can find the marketplace contract from the repo, here is a link to it:

Then you can deploy this contract for example using Remix and note down your contract address and contract ABI of this newly deployed contract (these will go in the MoralisDappProvider.js file).

Then to sync this contract with your Moralis server follow the steps outlined in the yt tutorial (timestamps 46:30 - 51:50).

Hope this notes lead you in the right direction :+1:

Where does the address come from at 48:08?

How can I get the authenticate button to work in the final code version?

I am following the tutorial video, done everything up to the explore page and it is not working showing me


How do I fix it

Thank you for this solution, so this part will go to the contract then how to add cancel button in the App.jsx
Can you please provide some code, thanks

It works. Thanks a bunch chief

1 Like

Hello All,
there is one suggest that to cancel the sale of nft, in case the seller wants to get his nft back
this is the solidity code:

function cancelSale(uint itemId) public nonReentrant{
require(msg.sender == idToMarketItem[itemId].seller, “You not are the owner of this item”);
require(idToMarketItem[itemId].sold == false,“The item has been sold”);
IERC721(idToMarketItem[itemId].nftContract).transferFrom(address(this), msg.sender, idToMarketItem[itemId].tokenId);
delete idToMarketItem[itemId];
}

then any suggestion how to implement the cancel button in the App.jsx (any sample code please to add in App)

POST https://ic5roflio13a.usemoralis.com:2053/server/functions/getNFTs 400

And none of the NFTs in my wallet are displayed. But if I reload this a bunch of times they are displayed.

Hi, I am following youtube video. For creating market item, I have minted test nfts on opensea testnet for mumbai. When I try to list the nft from my collection I get the error: “TypeError: Cannot read properties of undefined (reading ‘call’)”. Do you have any ideas what could be the problem or how i can debug it?

Hey @beng

Please post the function code which is called when you list the item.

Thank you

Hey @DorianFive

Please share your server details and a readable screenshot of network request and response (you can find it in the “network” tab in the dev tools.

Probably the getNFTs endpoint is called before the user address is defined(check your code)