seaport icon indicating copy to clipboard operation
seaport copied to clipboard

Understanding Zone

Open pamungkaski opened this issue 4 years ago • 10 comments

Hi guys, so I am trying to implement seaport with my own stack.

Was trying to write some docs and stumbled upon zone and zoneHash, so I wanted to clarify my understanding about it.

  1. Zone is a contract address of the onchain validator, this validator will check order data and also zoneHash validity, we have to write our own validator that implement the already declared interface
  2. Zone Hash is 32 Bytes long string generated by server to make sure that only the desired zone is able to validate this order

CMIIW, thanks

pamungkaski avatar Jun 02 '22 09:06 pamungkaski

Correct, we'll actually have an example zone we are about to publish. This will be the one that OpenSea uses.

Slokh avatar Jun 06 '22 13:06 Slokh

Thanks for this ticket, it's really useful to help understand zone.

caiiiyua avatar Jun 18 '22 10:06 caiiiyua

Yup, btw @Slokh https://etherscan.io/address/0x004C00500000aD104D7DBd00e3ae0A5C00560C00#code this is the zone that opensea currently use yeah? from what ive skim, when checking order validity, it currently does not check anything and straight up returning the magic value yeah? or did I miss something?

pamungkaski avatar Jun 18 '22 17:06 pamungkaski

@pamungkaski It checks that the contract exists! If OpenSea wanted to pause all orders, we would selfdestruct the contract, thereby making all orders invalid

Slokh avatar Jun 20 '22 04:06 Slokh

I found that some orders's zone is just a external account, and I have make some testing : if the zone address is a account address,then assembly call will always return true without concerning what calldata is

shiyuleixia avatar Jun 21 '22 12:06 shiyuleixia

I found that some orders's zone is just a external account, and I have make some testing : if the zone address is a account address,then assembly call will always return true without concerning what calldata is

oh that is intersting, can you send me the address and also the transaction id that use that zone

pamungkaski avatar Jun 21 '22 12:06 pamungkaski

I found that some orders's zone is just a external account, and I have make some testing : if the zone address is a account address,then assembly call will always return true without concerning what calldata is

oh that is intersting, can you send me the address and also the transaction id that use that zone

this one from the listings api ,the address of the zone really confuse me ,it's just an external account "created_date": "2022-06-21T07:45:44.958110", "closing_date": "2022-06-22T07:45:38", "listing_time": 1655797538, "expiration_time": 1655883938, "order_hash": "0x5e2c37ae291eee883d348581745fb03948c1612c495094373ae34327fd967d5a", "protocol_data": { "parameters": { "offerer": "0xce32ffef8ba0fbcaecea2578ca103884139f9156", "offer": [ { "itemType": 2, "token": "0x8a1C47a27876686fADDEB0713b2b26d731e8fDd6", "identifierOrCriteria": "2041694201525630780780247644590609268738", "startAmount": "1", "endAmount": "1" } ], "consideration": [ { "itemType": 1, "token": "0xc778417E063141139Fce010982780140Aa0cD5Ab", "identifierOrCriteria": "0", "startAmount": "87750000000000000", "endAmount": "87750000000000000", "recipient": "0xCe32fFEf8BA0FBCaeCEa2578ca103884139F9156" } ], "startTime": "1655797538", "endTime": "1656488738", "orderType": 2, "zone": "0x9B814233894Cd227f561B78Cc65891AA55C62Ad2", "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "salt": "71717547305167338", "conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000", "totalOriginalConsiderationItems": 1, "counter": 0 }, "signature": "0x77c0f8e25502ad4cbb704c85d3abec96220c55eb3dc218d342b38ea661662914161f13e3dc15ae0cf7e1cb3a813fc61e44cd7b94b3bf4e726b6e6605f3b937ff1b" }

shiyuleixia avatar Jun 22 '22 07:06 shiyuleixia

This one is on the test net right? dunno seems like a testing list IMO

pamungkaski avatar Jun 22 '22 07:06 pamungkaski

Correct, we'll actually have an example zone we are about to publish. This will be the one that OpenSea uses.

where can i get the zone's code that the seaport uses currently?

zhaochengzhang avatar Jun 24 '22 04:06 zhaochengzhang

Correct, we'll actually have an example zone we are about to publish. This will be the one that OpenSea uses.

where can i get the zone's code that the seaport uses currently?

check my answer above, I have zone link there

pamungkaski avatar Jun 24 '22 04:06 pamungkaski