ProjectOpenSea / opensea-js

TypeScript SDK for the OpenSea marketplace
https://docs.opensea.io/reference
MIT License
2.28k stars 960 forks source link

Wyvern orders posted to the API are deprecated, except for shared storefront orders #610

Closed Lebski closed 1 year ago

Lebski commented 2 years ago

When creating an order with createFactorySellOrders, I get the Error:

"['Wyvern orders posted to the API are deprecated, except for shared storefront orders']"

How can I use the new API?

I'm using opensea-js version 4.0.3

Meloneat commented 2 years ago

Hi, the problem confused you has been solved ? Wha't the point?

carlosbalsas commented 2 years ago

Same problem here, when I try to list an item throw SDK

Lebski commented 2 years ago

Aparently createFactorySellOrders is not supported anymore. I haven't found a solution for this.

Currently I'm trying to use an ERC721 to act as a Factory but I got another weird error in the Frontend when I try to buy the Asset. (InvalidRestrictedOrder)

cto-aarchik commented 2 years ago

same error while createSellOrder

Lebski commented 2 years ago

@cto-aarchik then you have to update your SDK. Maybe your old version is still in node_modules? You also have to import OpenSeaSDK .

import { OpenSeaSDK, Network } from 'opensea-js'
danobrown commented 2 years ago

Trying to place a bid on https://opensea.io/ and getting the same error.

Request URL: https://api.opensea.io/wyvern/v1/orders/post/

Response: "['Wyvern orders posted to the API are deprecated, except for shared storefront orders']"

cto-aarchik commented 2 years ago
OpenSeaSDK

i try this but not working

andremfaria commented 2 years ago

Same problem here. Also I get an "execution reverted" while creating the sell order via https://testnets.opensea.io/assets/rinkeby//0/sell. I don't know if the problem is related. Some days ago it all works smoothly.

laubsauger commented 2 years ago

Interestingly createFactorySellOrders worked for me until yesterday on rinkeby. Stopped working overnight - same setup, no code changes - resulting in the mentioned error.

Already approved proxy for all tokens
Already approved enough currency for trading
Error: API Error 400: Invalid request: "['Wyvern orders posted to the API are deprecated, except for shared storefront orders']"
    at OpenSeaAPI.<anonymous> (/Users/code/node_modules/opensea-js/lib/api.js:592:31)
    at step (/Users/code/node_modules/opensea-js/lib/api.js:63:23)
    at Object.next (/Users/code/node_modules/opensea-js/lib/api.js:44:53)
    at fulfilled (/Users/code/node_modules/opensea-js/lib/api.js:35:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
andremfaria commented 2 years ago

@laubsauger If you try manually via https://testnets.opensea.io/assets/rinkeby//0/sell do you get any error?

jtaaa commented 2 years ago

createFactorySellOrder has been deprecated due to some differences between wyvern and seaport, and because seaport unlocks better ways to accomplish the same (or similar) results. We've removed the doc page that suggests using this method and its implementation will be removed from the SDK in a future release.

Soon we will publish a new factory contract example and tutorial that is compatible with seaport. Sorry for the confusion.

Utcha commented 2 years ago

@jtaaa Hi I am also getting the same error when using createSellOrder. When can you fix this?

ssl commented 2 years ago

@cto-aarchik then you have to update your SDK. Maybe your old version is still in node_modules? You also have to import OpenSeaSDK .

import { OpenSeaSDK, Network } from 'opensea-js'

This is how i fixed createSellOrder not working. Updating opensea-js to 4.0.x and then changing the import 'OpenSeaPort' to 'OpenSeaSDK'. Works fine now.

coxlabz commented 2 years ago

@cto-aarchik then you have to update your SDK. Maybe your old version is still in node_modules? You also have to import OpenSeaSDK .

import { OpenSeaSDK, Network } from 'opensea-js'

This is how i fixed createSellOrder not working. Updating opensea-js to 4.0.x and then changing the import 'OpenSeaPort' to 'OpenSeaSDK'. Works fine now.

Hi there, would you mind sharing the node version that you're running on?

Lebski commented 2 years ago

I'm using Node v16

ssl commented 2 years ago

@cto-aarchik then you have to update your SDK. Maybe your old version is still in node_modules? You also have to import OpenSeaSDK .

import { OpenSeaSDK, Network } from 'opensea-js'

This is how i fixed createSellOrder not working. Updating opensea-js to 4.0.x and then changing the import 'OpenSeaPort' to 'OpenSeaSDK'. Works fine now.

Hi there, would you mind sharing the node version that you're running on?

v16.13.2

laubsauger commented 2 years ago

@cto-aarchik then you have to update your SDK. Maybe your old version is still in node_modules? You also have to import OpenSeaSDK .

import { OpenSeaSDK, Network } from 'opensea-js'

This is how i fixed createSellOrder not working. Updating opensea-js to 4.0.x and then changing the import 'OpenSeaPort' to 'OpenSeaSDK'. Works fine now.

Just tested this and unfortunately this does not fix the original issue with createFactorySellOrder. Mentioned error persists.

opensea-js@4.0.3
node@16.15.0
Lebski commented 2 years ago

@laubsauger No unfortunately they deprecated the whole factory functionality :(

This comment was meant for @cto-aarchik since he only wants to use createSellOrder which works with seaport. If you want to use createSellOrder with older contacts, you have to use the legacy function (createSellOrderLegacyWyvern)

aaltergot commented 2 years ago

Experiencing same issue. What's the reason behind the API deprecation? There is no chance it'll be un-deprecated, right? And also there is no substitution to this functionality planned.

laubsauger commented 2 years ago

Experiencing same issue. What's the reason behind the API deprecation? There is no chance it'll be un-deprecated, right? And also there is no substitution to this functionality planned.

It's only been like two weeks. Still no documentation or anything really. Guess it's time to move.

Lebski commented 2 years ago

Experiencing same issue. What's the reason behind the API deprecation? There is no chance it'll be un-deprecated, right? And also there is no substitution to this functionality planned.

I think they changed the underlying protocol. Which also means their own contract won't work with new API. And I don't see a chance that this is coming back. They announced that they will bring back the factory but no examples etc. are available.

laubsauger commented 2 years ago

Experiencing same issue. What's the reason behind the API deprecation? There is no chance it'll be un-deprecated, right? And also there is no substitution to this functionality planned.

I think they changed the underlying protocol. Which also means their own contract won't work with new API. And I don't see a chance that this is coming back. They announced that they will bring back the factory but no examples etc. are available.

Did you find any alternative to create lazy mint sells from a factory? Different approach on opensea or on a different platform?

metatonks commented 2 years ago

@laubsauger Hi, did you find any documentation on a new "factory" for lazy mint. (I had build around this and now functionality seems to have been pulled)

laubsauger commented 2 years ago

@metatonks No. We got really screwed up by this change, having built up the setup, rolling the marketing etc only to have this pulled without replacement. Couldn't get something comparable to work on LooksRare and Rarible just yet. Might have to pull the whole thing and put up a lame self-mint.

Bright side is, we wouldn't have to hand over service fees to OpenSea :P

Lebski commented 2 years ago

Did you find any alternative to create lazy mint sells from a factory? Different approach on opensea or on a different platform?

Since the change happend literally before our scheduled mint we came up with the following solution:

  1. We created an ERC1155 on the OpenSea Frontend, which allowed us to use lazy mint
  2. We created custom orders (whitelists) with the API and the createSellOrderLegacyWyvern function
  3. After the sale we made a snapshot of token owners with the moralis API see code here
  4. We AirDropped the token via basic ERC721 smart contract
cchyung commented 2 years ago

Since this is related - how do contract-based wallets sell on OpenSea? If Wyvern-based orders can't be posted to OpenSea after _approveOrder is called what can contracts do to relist NFT's that they hold?

metatonks commented 2 years ago

@jtaaa Hi, any estimated timeline on an update factory contract example? Or some documents or hints on how to make this work? Factory contract seems fine I just need a way to sell the options. Thank you.

Deathwing commented 2 years ago

I finally got a working factory contract out but the missing createFactorySellOrders is ruining everything. I mean I can sell 1 option at a time via the web interface, but that is not a great solution at all :) I even tried createSellOrder with quantity > 1, but that just resulted in 'The offerer does not have the amount needed to create or fulfill.', while doing it with quantity == 1, I got '[InternalError: Internal error] { code: -32603 }', so it seems no way around ;(

Lebski commented 2 years ago

@Deathwing would you mind sharing the factory part of the contract with me? Our sale is already over but I'm curious how you made it work...

Deathwing commented 2 years ago

@Lebski Sure, I also found a way to even get the open-sea API working, so take a look: https://gist.github.com/Deathwing/b49c03c465c17312f8affc536b5ea64d

Lebski commented 2 years ago

@Lebski Sure, I also found a way to even get the open-sea API working, so take a look: https://gist.github.com/Deathwing/b49c03c465c17312f8affc536b5ea64d

Awesome! Thanks for sharing

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.