Skip to content

Instantly share code, notes, and snippets.

@Rotemy
Last active July 6, 2022 09:23
Show Gist options
  • Save Rotemy/ce5eb81c49af78744dac63d5d087c591 to your computer and use it in GitHub Desktop.
Save Rotemy/ce5eb81c49af78744dac63d5d087c591 to your computer and use it in GitHub Desktop.
Request for Opensea to add the option to execute static call before or after the sale
@Rotemy
Copy link
Author

Rotemy commented Jul 6, 2022

In Wyvren Protocol there was an option to call a static target with data after a sale and in that static call to verify the sale.

telegram-cloud-photo-size-4-5917799476406368425-y

However, in Seaport Protocol, there isn’t any option to do that.

After going thoroughly over Seaport protocol's code, I believe the proper place to add this functionality is in a Zone. Reciting from Seaport documentation:

The zone of the order is an optional secondary account attached to the order with two additional privileges:

  • The zone may cancel orders where it is named as the zone by calling cancel. (Note that offerers can also cancel their own orders, either individually or for all orders signed with their current counter at once by calling incrementCounter).

  • "Restricted" orders (as specified by the order type) must either be executed by the zone or the offerer, or must be approved as indicated by a call to an isValidOrder or isValidOrderIncludingExtraData view function on the zone.

So it seems like isValidOrder or isValidOrderIncludingExtraData is the right place to add this functionality.

Another option, is to allow order creators to set their own zone and not block it. Right now, when I try to use my own zone I get this error:

image

However, if they allow it, order creators would be able to utilize the ZoneHash parameter, reciting again from Seaport documentation:

The zoneHash represents an arbitrary 32-byte value that will be supplied to the zone when fulfilling restricted orders that the zone can utilize when making a determination on whether to authorize the order.

I would be happy to have a closer discussion with Opensea's developer about this matter.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment