Cloning OpenSea NFT Boilerplate Questions

Hi @joejohnson,

You can find the contract used in this tutorial in src/contracts/marketplaceBoilerplate.sol. This can be deployed on Remix, by compiling it and using Inject Web 3 to deploy also if you’re comfortable you can use hardhat :slight_smile:

@ZeusExMachina
No payment for testing out on testnet, you can use for example https://faucet.polygon.technology/ to get some MATIC on the Mumbai testnet and use this to mint some NFTs on the network!

Hey @Charliemc,

The explore is probably coming all the way from src/App.jsx where:

const [inputValue, setInputValue] = useState("explore");

This is done to identify whether to show a collection or the explore page on the “Explore Market” tab. But addr should be set to the Tokens Contract address yes.

1 Like

Hi, it’s been several days since I tried to make this project working with my contracts deployed on rinkeby network.

I have some issues either when i paste the ABI on the provider file and also when I try to get the NFTs from useNFTTokenIds.js file. In the second case, it seems that token.getAllTokenIds works only within the async function (like I’ve found in the docs) and not within useMoralisWeb3ApiCall (outside of useEffect call).

I checkout also to the suggested commit but both the issues are still there.

Any help?

Thank you!

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.

  1. Should I have had the NFT collection integrated into my wallet prior to starting the clone?

  2. I cloned the old git and checked and all went okay, but I think I may have missed some steps.

  3. 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.

  4. 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.

  5. 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!!!

example1|690x388

1 Like

How a user can create their own NFT on this clone??

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.`

@cryptokid @Yomoo

Let’s continue here Ethereum Boilerplate Questions

1 Like

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 :slight_smile:

const queryMarketItems = useMoralisQuery(“MarketItems”); //what the boilerplate has
const queryMarketItems = useMoralisQuery(“CreatedMarketItems”); //what you need

1 Like

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 :+1:

You were right, I had missed that.
Everything seems to work just fine now, thank you!!

1 Like

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.