Cloning OpenSea NFT Boilerplate Questions

I listed my NFT successfully but cannot see it the “buy now” option. I checked on etherscan and I see the create market Item by the contract.

Also I have the contract address and ABI in MoralisDappProvider.js

I am hosting my own server (parse server)

Do you have the market item in your MarketItems class / table? This is the buy now code that depends on it.

no it’s not there… is this database still valid with my own server?

You need to sync the MarketItemCreated event to your server. You will need to do this with the Streams API now for your self-hosted server.

ok, abit confused on how this works though, should I just add these 2 lines to my .env in the parse server project?

USE_STREAMS = ‘true’

STREAMS_WEBHOOK_URL = ‘/streams-webhook’

You can check out this demo.

You can find out more about the Streams API.

There is a new tutorial here which may be easier to follow.

ok I created a stream on Moralis.io by following the tutorial, but not sure how to link it to the boilerplate code. it should be connected to my MongoDB now

should I add the USE_STREAMS in .env after setting up the stream ? I have it setup on MOralis

Looks like you don’t have to worry about USE_STREAMS, it isn’t being used in the Parse server demo.

ok I created a stream on Moralis.io by following the tutorial, but not sure how to link it to the boilerplate code

The boilerplate queries your database’s MarketItems table by default. So if you set up a stream for the MarketItemCreated events and save them to this table in the same way (like with hosted servers), it should work.

What you can do is test first by manually creating the event record/object for one of your NFTs that is for sale to make sure the boilerplate app works with it first.

how can I save the event to the table MarketItems? it is a Moralis object right? are Moralis objects stored on Moralis servers or can I store them on parse server?

how can I save the event to the table MarketItems?

It should work in the same way when you create an object.

these objects are stored on a Moralis server and Moralis is getting rid of servers right?
image

that’s the whole reason I am hosting my own server everything was working on Moralis servers fine before

these objects are stored on a Moralis server and Moralis is getting rid of servers right?

Yes, that’s why you will need to self host.