Cancel all listings for a specific NFT #545
Replies: 8 comments
-
The zone of the order is an optional secondary account attached to the order with two additional privileges: |
Beta Was this translation helpful? Give feedback.
-
yup, but there is a case in which i only want to cancel order for a single NFT. the incrementCounter invalidate all order signed for that wallet, hence it cannot be used, I still need to cancel my order 1 by 1 on a single NFT. Yeah, so my idea is to implement another way to cancel all order an NFT has, for now I am going to use zone to cancel that order probably. |
Beta Was this translation helpful? Give feedback.
-
You referred a counter with a nonce. Seaport doesn't use a counter as a nonce. They use a salt for a unique hash so cancel by a nonce is pretty much same as incrementCounter. |
Beta Was this translation helpful? Give feedback.
-
yeah thats basically my questions, why didnt seaport use nonce cancelation cus it will safe gas to cancel all order on the same NFT, rather they do cancelation for each hash, which means I need to cancel each order 1 by 1 if i dont want to cancel other NFT' sorder. As a NFT tradder myself, I often found myself lowering the price then needed to cancel all of the order that I created 1 by 1. I think canceling all order in 1 NFT is much more common to do compared canceling all active order i ever signed |
Beta Was this translation helpful? Give feedback.
-
As far as I know the purpose of Seaport is to minimize gas fee as possible as they can and they did decrease gas limit compared to Wyvern. |
Beta Was this translation helpful? Give feedback.
-
CMIIW but seaport save the whole hash to mark an order is canceled seaport/contracts/lib/OrderValidator.sol Lines 29 to 30 in 171f2cd IMO related to storage, I don't think it is that different saving canceled in a hash compared to storing nonce. I think that in worst case scenario, storing it in hash take more storage compared to have a single nonce since you have to store every single order status if the canceled. Probably it is more of a way to match how wyvern works. Since wyverns, on OpenSea, when you want to lower the price, you will create a new order with lower price, this order will then appended to the current active order of the NFT. While if you use nonce, lowering price means replacing the current active order with new one by assigning the new nonce. Tho you can still have multiple order active, it just that when once is canceled other will be also canceled. |
Beta Was this translation helpful? Give feedback.
-
@pamungkaski A custom zone with this functionality seems like the right approach |
Beta Was this translation helpful? Give feedback.
-
/** |
Beta Was this translation helpful? Give feedback.
-
Regarding Cancel
The code
seaport/contracts/lib/OrderValidator.sol
Lines 358 to 360 in 171f2cd
So cancelation is only marking this hash to be cancled and not active, which means if the user already lowered a listing several time, like a true degen, they will need to cancel every single listing they made while lowering. Is it possible to use a nonce canceling instead of hash canceling, so basically each lowered listing will have the same nonce, hence when once is cancelled on chain, every single one of them is also canceled.
I am thinking of doing that cancelation on the zone. but I am kinda curious why we don't use this nonce cancelation method instead of hash canceling cus it kinda save more gas. CMIIW
Beta Was this translation helpful? Give feedback.
All reactions