Hi, was wondering if there is an updated working final code of this tutorial. So without the outdated âmoralisDappProviderâ and other stuff? Thanks!
I went and read this forum and github instructions before posting.
-
Should I have had the NFT collection integrated into my wallet prior to starting the clone?
-
I cloned the old git and checked and all went okay, but I think I may have missed some steps.
-
I noticed the market.sol contract ABI steps in the github instructions were different than the video. I am not sure if that caused an error.
-
When I finally ran the code, I only am viewing the traditional boiler plate. I am not seeing any of the NFT marketplace front end.
-
Can you provide instructions if I was suppose to âaddâ in the NFTâs in my wallet?
By the way, I am a moralis acadmey student, and in the hackathon, so while itâs great Moralis will have an NFT lauch pad, I am trying to learn coding, so I would appreciate any help! Thank you kindly!!!
ethereum boilerplate bro, i used yarn start but it says start not found and this error below`warning package.json: No license field
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
Hello Everyone,
I am having some issueas with creating a market item. Its say âTypeError: Cannot read properties of undefined (reading âcallâ)â. But when i look in the options of the body that gets fetched i have al the data.
Does anyone have any idea what this problem is?
what is the line that gives that error with undefined? a variable should be undefined there, not the parameters
Iâve successfully deployed the contract to Mumbai test net.
Iâve also been able to display my NFT collection on the explore page and under âMy collectionsâ tab.
However, something goes wrong when I list my NFTs for sale.
They appear in the database under CreatedMarketItems
but nothing shows up under the âTransactionsâ tab and the NFT still is not listed as for sale under the âExploreâ tab.
Does anyone know what might be causing this?
Iâm using the OpenZeppelin ERC-721 standard for my NFT collection.
please how to make the ABI file in a sting format , ?
I am not sure what you are intending to do, but if you need to use the ABI of a smart contract I donât recommend using the whole file, just a snippet is enough, but since itâs JSON, you can just stringify it by
JSON.stringify(ABI);
And the result of this will be string version of the ABI.
Is there a good way to load the NFT display page faster without having to check through all token ids each time?
Iâm thinking maybe check once, send object to database and then use this database for displaying?
It would also need to be updated periodically or when a mint happens.
My issue is sometime the page times out or takes like 5 mins to fully load. Only 250 nfts
Hey @Apap,
Have you changed the NFTTokenIds.jsx
and NFTMarketTransactions.jsx
components to query for the CreatedMarketItems
class you have in the database? The README suggests you name the class MarketItems
, which the boilerplate was eventually made to respond to
const queryMarketItems = useMoralisQuery(âMarketItemsâ); //what the boilerplate has
const queryMarketItems = useMoralisQuery(âCreatedMarketItemsâ); //what you need
Hey @Nicole22 ,
Sorry for the little wait in response over Christmas. Great to see you are trying this out, it seems you have cloned the repo used at the start of the youtube tutorial, explaining why you are seeing the ethereum-boilerplate frontend. You should be able to follow along with the tutorial from here on out, but if you wish to checkout the marketplace boilerplate you should be able to clone this repo and follow its README instructions:
To test out the listing and purchasing functionality, you just need to have a NFT in your wallet (I would recommend some NFT in a testnet like Mumbai) and add this collection to the collections.js
helper file
You were right, I had missed that.
Everything seems to work just fine now, thank you!!
Hey @Fitz,
Checkout the documentation for the web3 getAllTokenIds call:
https://docs.moralis.io/moralis-server/web3-sdk/token#getalltokenids
You could use the limit
parameter to only check through the N first NFTs and then use the offset
parameter to load more when desired.
listed NFT work fine but after listing it still show âThis NFT is currently not for saleâ what i can do now.
@IAmJaysWay thank you for responding. I am looking forward to building this demo!
I did clone the repository. Couple more questions
-
I launched the contract (per your instructions) and copied the ABI (after I put it in the clipboard as well), but moralis gave errors.
-
In your github instructions you donât mention using the ABI code (as itâs shown in the video) and the table name doesnâ match from the video. (see the above pic)
Thanks! I love this video!
Hey @pkgujjar It may take a minute or so for the NFT to be set as âfor saleâ (due to the Moralis server waiting for the on-chain list event to change from pending to confirmed).
If waiting a while doesnât work, you could check that the items you put up for sale are being updated to your Moralis database in to the MarketItems
class. If they are updating correctly over there, it is most likely a error in the Moralis query (ie. querying for the wrong class name), but otherwise your sync event may not be set up correctly and I would try redoing that.
Make sure you have the contract ABI pasted as a stripped string to the MoralisDappProvider.js
file, this has solved the problem for others in the past:
And as for the sync event you can follow the video step by step, but just change the table name from CreatedMarketItems
to MarketItems
as this has been changed in the boilerplate code