From a1b95501a86152d0a61031e8fa921bd3c81c2d1a Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Mon, 1 Dec 2025 12:55:40 -0800 Subject: [PATCH 1/3] Update SIP-15: Interface for Dynamic Traits Enforcement --- SIPS/sip-15.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/SIPS/sip-15.md b/SIPS/sip-15.md index 60ac4b5..052dacc 100644 --- a/SIPS/sip-15.md +++ b/SIPS/sip-15.md @@ -2,7 +2,7 @@ sip: 15 title: Interface for Dynamic Traits Enforcement description: A Seaport interface for specifying and enforcing values of ERC-7496 Dynamic Traits. -author: Ryan Ghods (@ryanio), James Wenzel (emo.eth) +author: Ryan Ghods (@ryanio), James Wenzel (emo.eth), Benjamin C. LeFevre (BCLeFevre) discussions-to: https://github.com/ProjectOpenSea/SIPs/discussions/19 status: Draft type: Standards @@ -51,20 +51,16 @@ If the implementing contract is a contract offerer, it MUST provide `previewOrde The `context` argument MUST be populated based on the "substandards" specified by the zone or contract offerer; these substandards will be encoded in accordance with SIP-6 versioning with the assumption that all necessary data is to be treated as "variable" data arrays. -The `context` MUST start with a byte identifying the substandard ID below. The byte SHOULD be 1-indexed, but for gas efficiency reasons, 00 MAY also be used as an alias to reference substandard ID 1. - -todo MUST be compact +The `context` MUST start with a byte identifying the substandard ID below. For gas efficiency, substandard IDs SHOULD be kept compact (for example, starting at 0) and re‑used consistently across integrations. Initial substandards include: | substandard ID | description | decoding scheme | | -------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | -| 0 | first consideration item, comparison "equal to", single trait key, zero trait value | `(bytes32 traitKey)` TODO think about this should be in the zone hash, when no extra data is provided | -| 1 | token address and id from first offer item | `(uint8 comparisonEnum, bytes32 traitValue, bytes32 traitKey)` | -| 2 | token address and id from the first consideration item | `(uint8 comparisonEnum, bytes32 traitValue, bytes32 traitKey)` | -| 3 | single token id, single trait key and value(single) | `(uint8 comparisonEnum, address token, uint256 tokenId, bytes32 traitValue, bytes32 traitKey)` | -| 4 | multiple token ids, single trait key and value(multiple) | `(uint8 comparisonEnum, address token, uint256 tokenId, bytes32 traitValue, bytes32 traitKey)[]` | -| 5 | single token id, multiple traitKeys and values | `` | +| 0 | single token (address, id), multiple traitKeys and values on that subject | `(address token, uint256 tokenId, (bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[])` | +| 1 | token address and id from first offer item | `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` | +| 2 | token address and id from the first consideration item | `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` | +| 4 | multiple token ids, single trait key and value(multiple) | `(address token, uint256 tokenId, bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[]` | | comparison enum | behavior | | --------------- | ------------------------ | @@ -75,6 +71,8 @@ Initial substandards include: | 4 | greater than | | 5 | greater than or equal to | +For substandard 0, the context explicitly binds a single NFT subject via `(address token, uint256 tokenId)` and then encodes one or more `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` tuples for that subject. Other substandards MAY instead derive the subject token and identifier from the order's offer or consideration items while using the same comparison and trait tuple shape. + Additional substandards MAY be specified in subsequent SIPs that inherit this SIP. ## Rationale From a2add2e2d4af82224b86cac690be2502fbe679c0 Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Mon, 1 Dec 2025 13:02:09 -0800 Subject: [PATCH 2/3] Revise substandard descriptions and decoding schemes Updated the descriptions and decoding schemes for substandards in the SIP-15 document. --- SIPS/sip-15.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/SIPS/sip-15.md b/SIPS/sip-15.md index 052dacc..c9efb8a 100644 --- a/SIPS/sip-15.md +++ b/SIPS/sip-15.md @@ -2,7 +2,7 @@ sip: 15 title: Interface for Dynamic Traits Enforcement description: A Seaport interface for specifying and enforcing values of ERC-7496 Dynamic Traits. -author: Ryan Ghods (@ryanio), James Wenzel (emo.eth), Benjamin C. LeFevre (BCLeFevre) +author: Ryan Ghods (@ryanio), James Wenzel (emo.eth), Benjamin C. LeFevre (BCLeFevre) discussions-to: https://github.com/ProjectOpenSea/SIPs/discussions/19 status: Draft type: Standards @@ -55,12 +55,11 @@ The `context` MUST start with a byte identifying the substandard ID below. For g Initial substandards include: -| substandard ID | description | decoding scheme | -| -------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | -| 0 | single token (address, id), multiple traitKeys and values on that subject | `(address token, uint256 tokenId, (bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[])` | -| 1 | token address and id from first offer item | `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` | -| 2 | token address and id from the first consideration item | `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` | -| 4 | multiple token ids, single trait key and value(multiple) | `(address token, uint256 tokenId, bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[]` | +| substandard ID | description | decoding scheme | +| -------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| 0 | single token, multiple traits | `(address token, uint256 tokenId, (bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[])` | +| 1 | multiple tokens, single trait each | `(address token, uint256 tokenId, bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[]` | +| 2 | multiple tokens, multiple traits each | `((address token, uint256 tokenId, (bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)[])[])` | | comparison enum | behavior | | --------------- | ------------------------ | @@ -71,7 +70,7 @@ Initial substandards include: | 4 | greater than | | 5 | greater than or equal to | -For substandard 0, the context explicitly binds a single NFT subject via `(address token, uint256 tokenId)` and then encodes one or more `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` tuples for that subject. Other substandards MAY instead derive the subject token and identifier from the order's offer or consideration items while using the same comparison and trait tuple shape. +For substandard 0, the context explicitly binds a single NFT subject via `(address token, uint256 tokenId)` and then encodes one or more `(bytes32 traitKey, bytes32 traitValue, uint8 comparisonEnum)` tuples for that subject. Substandard 1 encodes multiple `(token, tokenId, traitKey, traitValue, comparisonEnum)` tuples for validating a single trait on each of multiple tokens. Substandard 2 combines both approaches, allowing multiple tokens each with multiple traits. Additional substandards MAY be specified in subsequent SIPs that inherit this SIP. From 89992f5c00eff6312939a6925eba6b989a0526d9 Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Mon, 1 Dec 2025 13:02:44 -0800 Subject: [PATCH 3/3] Fix author formatting in sip-15.md --- SIPS/sip-15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SIPS/sip-15.md b/SIPS/sip-15.md index c9efb8a..fbaa1e2 100644 --- a/SIPS/sip-15.md +++ b/SIPS/sip-15.md @@ -2,7 +2,7 @@ sip: 15 title: Interface for Dynamic Traits Enforcement description: A Seaport interface for specifying and enforcing values of ERC-7496 Dynamic Traits. -author: Ryan Ghods (@ryanio), James Wenzel (emo.eth), Benjamin C. LeFevre (BCLeFevre) +author: Ryan Ghods (ryanio), James Wenzel (emo.eth), Benjamin C. LeFevre (BCLeFevre) discussions-to: https://github.com/ProjectOpenSea/SIPs/discussions/19 status: Draft type: Standards