DEV Community

Discussion on: Deploying Regenerative NFTs on Polygon

 
benm4nn profile image
benm4nn

I found this one liner on why the OpenSea Creatures sell script fails on Polygon with TypeError: Cannot read property 'WyvernExchange' of undefined...
"OpenSea uses different order matching for ethereum and polygon. On Ethereum, Wyvern is used, but on Polygon, 0x v3 is used."
(ethereum.stackexchange.com/questio...)

So I guess I need a sell script that uses 0x v3 protocol instead, but can't see how on earth to do that!

Thread Thread
 
yournewempire profile image
Archie Smyth

Hey Ben, thankful for the great response.

I will be honest, I have never used the sell script, therefore never looked into it that much. With your introduction of it, I shall definitely have a look, seems interesting.

This is a bit of a problem when there are no OpenSea examples for PolygonMatic sell scripts. I can already tell by looking at the script on lines 36 and 49 that you would be relying on OpenSeaPort to have compatibility with a Matic.

So I was snooping around in the Opesea.js GitHub and OpenSeaPort docs and cant find 'Polygon' or 'Matic' anywhere. I will continue to search around.

Thanks, Archie

Thread Thread
 
benm4nn profile image
benm4nn

Thanks Archie, After a few hours of poking around, here's what I'm trying... It overcame the error I had before but there's very little out there about the sell.js and Polygon/Matic except a few comments suggesting that OpenSea's v1 API doesn't support it yet....

So I tried this... network name as Network.Matic....
const seaport = new OpenSeaPort(
providerEngine,
{
networkName: Network.Mumbai //,
// apiKey: API_KEY, /* i dont have (opensea) API_KEY */
},
(arg) => console.log(arg)
);

This got me past the previous error... But now I'm stuck with this new error...

FetchError: request to api.opensea.io/api/v1/asset/0xdbb6...? failed, reason: certificate has expired

Obviously I've checked all my keys (I'm using Alchemy with a key defined specifically for Polygon Mumbai)....
And I don't have the optional OpenSea API but have applied for one...

Ever onward! But really don't want to have to put thousands of Polygon NFTs up for sale individually by hand!

Thread Thread
 
yournewempire profile image
Archie Smyth

Hey Ben, I just got a response from opensea discord:

You should go join OpenSea, Polygon discords if you have not already.

Thanks, Archie