Error: API Error 400: Please provide an OPEN order type when using 0x004c00500000ad104d7dbd00e3ae0a5c00560c00 on Seaport v1.4...
Error: API Error 400: Please provide an OPEN order type when using 0x004c00500000ad104d7dbd00e3ae0a5c00560c00 on Seaport v1.4 - you provided: PARTIAL_RESTRICTED (3), please set it to be FULL_OPEN (0) or PARTIAL_OPEN (1) at OpenSeaAPI.
const listing = await openseaSDK.createSellOrder({
asset: {
tokenAddress: _contract_address,
tokenId: _tokenid
},
accountAddress : _account_address,
startAmount: _price,
endAmount: _price,
quantity : _quantity,
expirationTime : expirationTime
});
opensea-js version:4.0.12, seaport-js: 1.0.8
It's been a long time since I updated my code, can anyone tell me what's the problem???
============
seaport-js :
Seaport.prototype._getOrderTypeFromOrderOptions = function (_a) {
229 var allowPartialFills = _a.allowPartialFills, restrictedByZone = _a.restrictedByZone;
230 if (allowPartialFills) {
231 return restrictedByZone
232 ? constants_1.OrderType.PARTIAL_RESTRICTED
233 : constants_1.OrderType.PARTIAL_OPEN;
234 }
235 return restrictedByZone ? constants_1.OrderType.FULL_RESTRICTED : constants_1.OrderType.FULL_OPEN;
236 };
so I try to set restrictedByZone: false and allowPartialFills: false, or set restrictedByZone: false and allowPartialFills: true at:
return [4 /*yield*/, this.seaport.createOrder({
667 offer: offerAssetItems,
668 consideration: considerationFeeItems,
669 startTime: listingTime,
670 endTime: (_b = expirationTime === null || expirationTime === void 0 ? void 0 : expirationTime.toString()) !== null && _b !== void 0 ? _b : (0, utils_1.ge
671 zone: constants_2.DEFAULT_ZONE_BY_NETWORK[this._networkName],
672 domain: domain,
673 salt: salt,
674 restrictedByZone: false,
675 allowPartialFills: false,
676 }, accountAddress)];
It gives me new error:
Error: API Error 400: ['Invalid order signature'] at OpenSeaAPI
This is seriously a terrible issue, which makes my dapp totally unavailable
We have sunset Seaport 1.1 and updated the SDK to use Seaport 1.4. You must be on version 4.0.15 or greater to use the proper contract. I recommend using the latest 4.0.23
Thanx, problem solved, but when I install 4.0.23, the opensea-js lib folder is empty, now I use 4.0.16 and it works
@JoshuaSchmidt-OpenSea (cc: @kevgithub )
Thank you for the correction.
I was able to confirm that it is fixed, but it seems that the placement under lib has changed.
e.g.
# old
import { OpenSeaSDK } from 'opensea-js/lib'
# latest
import { OpenSeaSDK } from 'opensea-js/lib/src'
Now nests in lib/src, which was not there before.
Is this the expected behavior?
I would appreciate your confirmation.
Thanks.
@pi9min
#4.0.16
import { OpenSeaSDK, Network } from 'opensea-js'
#4.0.23
import { OpenSeaSDK, Network } from 'opensea-js/lib/src/index.js'
These above work for me, neither of the import path you mentioned work in my code
@kevgithub @pi9min Sorry for the build folder mistake. This has been remedied on the latest version 4.0.24 https://www.npmjs.com/package/opensea-js/v/4.0.24?activeTab=explore