opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

matchingOrder function for seaport order?

Open benharbit opened this issue 4 years ago • 4 comments

Is there a function which creates a matching order for a seaport protocol order?

benharbit avatar Jun 16 '22 12:06 benharbit

It is the function public async fulfillOrder({ order, accountAddress, recipientAddress, }: { order: OrderV2; accountAddress: string; recipientAddress?: string; }

benharbit avatar Jun 16 '22 14:06 benharbit

hello @risingsun007!

opensea-js does not have functionality to match orders for seaport -- we built a separate package seaport-js for interacting with the contract. More specifically, you can use this method once you've gotten the order you want to fulfill!

cterech avatar Jun 16 '22 14:06 cterech

If you call the fullfillorder on the opensea-js library it calls the seaport library version of fullfullorder

(https://github.com/ProjectOpenSea/opensea-js/blob/ff0a7a58d6d8f824ffabd16910afa59f38df155d/src/sdk.ts#L1528)

benharbit avatar Jun 16 '22 14:06 benharbit

Sorry, I think i misunderstood your question. Here is how you create a counter order given a seaport order

cterech avatar Jun 16 '22 15:06 cterech