Skip to content

Commit 2e217ad

Browse files
committed
feat(EVES-003): add EVM/ERC-721 token metadata support
Extend EVES-003 to support EVM chains alongside the existing Tezos/TZIP-21 token metadata path, enabling minting simulation asset NFTs as ERC-721 tokens on Ethereum-compatible chains such as Etherlink L2, as anticipated by EVES-006 and EVES-007. Spec text (eves-003.md): - Add EVES-007 and EVES-008 to requires frontmatter - Add RFC 2119 boilerplate at top of Specification section - Add [29] RFC 1766 reference for language field - Generalize abstract to reference both TZIP-21 and ERC-721 - Branch Steps 2, 4, and 5 for chain-specific token metadata files - Add EVM contract identifier (Etherlink L2) to Section 5 - Restructure into parent "6. Token Metadata" section with subsections for TZIP-21 (Tezos) and ERC-721 (EVM) - Add ERC-721/OpenSea metadata mapping table with background_color, contributors, and language rows - Add language row to TZIP-21 mapping table (backed by TZIP-21 spec) - Clarify did:ethr as cross-chain organizational identity (EVES-008) - Add ERC-7572 contract-level metadata subsection - Recommend ERC-5192 for soulbound tokens, ERC-4906 for metadata update events - Fix ontology property paths to match current SHACL shapes - Migrate ontology IRIs to w3id.org (envited-x/v3, manifest/v5, hdmap/v6) Schemas: - Fix JSON Schema draft-07 $ref sibling bug (move title into asset definition) in both schemas - Replace "e.g." with "for example" in all schema descriptions - New erc721_token_metadata-schema.json (JSON Schema draft-07) - TZIP-21: add required ["name"], update minter to DID per EVES-008, fix RFC 1776 → RFC 1766 Examples: - New erc721_token_metadata.json with background_color "111827", ontology IRIs as trait_type (lossless mapping) - TZIP-21: update minter to did:ethr per EVES-008, migrate ontology IRIs - Manifest: fix @context to array-style, update gx namespace, fix hasLicense structure per manifest SHACL Closes #35 Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
1 parent 7661aa5 commit 2e217ad

10 files changed

Lines changed: 765 additions & 76 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Schema Validation
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "EVES/**/example/*.json"
7+
- "EVES/**/*-schemas/*.json"
8+
- "package.json"
9+
10+
jobs:
11+
validate:
12+
name: Validate Examples Against Schemas
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
20+
with:
21+
node-version: "22"
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Validate schemas
28+
run: npm run validate:schemas

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules/
22
EVES/EVES-003/example/
33
EVES/EVES-003/tzip21-schemas/
4+
EVES/EVES-003/erc721-schemas/
45
.github/styles/
56
*.zip
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/asset",
4+
"definitions": {
5+
"asset": {
6+
"title": "ERC-721 Token Metadata",
7+
"type": "object",
8+
"additionalProperties": true,
9+
"required": [
10+
"name",
11+
"image"
12+
],
13+
"properties": {
14+
"name": {
15+
"type": "string",
16+
"description": "Identifies the asset to which this NFT represents."
17+
},
18+
"description": {
19+
"type": "string",
20+
"description": "Describes the asset to which this NFT represents."
21+
},
22+
"image": {
23+
"type": "string",
24+
"format": "uri-reference",
25+
"description": "A URI pointing to a resource with mime type image/* representing the asset. Maps to TZIP-21 displayUri."
26+
},
27+
"animation_url": {
28+
"type": "string",
29+
"format": "uri-reference",
30+
"description": "A URI pointing to the actual asset content (for example, asset.zip download URL). Maps to TZIP-21 artifactUri."
31+
},
32+
"external_url": {
33+
"type": "string",
34+
"format": "uri-reference",
35+
"description": "A URI pointing to an external page with additional information about the asset (for example, domain metadata on IPFS). Maps to TZIP-21 externalUri."
36+
},
37+
"background_color": {
38+
"type": "string",
39+
"pattern": "^[0-9a-fA-F]{6}$",
40+
"description": "Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #."
41+
},
42+
"minter": {
43+
"type": "string",
44+
"description": "The DID of the LegalEntity (OrganizationParticipant) responsible for minting the asset, as defined in EVES-008 (for example, did:ethr:<chainIdHex>:<address>). EVES extension."
45+
},
46+
"creators": {
47+
"type": "array",
48+
"description": "The primary person, people, or organization(s) responsible for creating the intellectual content of the asset.",
49+
"uniqueItems": true,
50+
"items": {
51+
"type": "string"
52+
}
53+
},
54+
"contributors": {
55+
"type": "array",
56+
"description": "The person, people, or organization(s) that have made substantial creative contributions to the asset.",
57+
"uniqueItems": true,
58+
"items": {
59+
"type": "string"
60+
}
61+
},
62+
"publishers": {
63+
"type": "array",
64+
"description": "The person, people, or organization(s) primarily responsible for distributing or making the asset available to others in its present form.",
65+
"uniqueItems": true,
66+
"items": {
67+
"type": "string"
68+
}
69+
},
70+
"date": {
71+
"type": "string",
72+
"format": "date-time",
73+
"description": "A date associated with the creation or availability of the asset."
74+
},
75+
"type": {
76+
"type": "string",
77+
"description": "A broad definition of the type of content of the asset."
78+
},
79+
"language": {
80+
"type": "string",
81+
"description": "The language of the intellectual content of the asset as defined in RFC 1766. EVES extension."
82+
},
83+
"rights": {
84+
"type": "string",
85+
"description": "A statement about the asset rights, for example, an SPDX license identifier."
86+
},
87+
"rights_uri": {
88+
"type": "string",
89+
"format": "uri-reference",
90+
"description": "Links to a statement of rights (for example, full license text or smart contract DID). Maps to TZIP-21 rightsUri. EVES extension."
91+
},
92+
"identifier": {
93+
"type": "string",
94+
"description": "A string or number used to uniquely identify the asset. Ex. URL, URN, UUID, ISBN, DID, etc."
95+
},
96+
"formats": {
97+
"type": "array",
98+
"items": {
99+
"$ref": "#/definitions/format"
100+
}
101+
},
102+
"attributes": {
103+
"type": "array",
104+
"items": {
105+
"$ref": "#/definitions/attribute"
106+
},
107+
"description": "OpenSea-style attributes describing traits of the asset."
108+
}
109+
}
110+
},
111+
"format": {
112+
"type": "object",
113+
"additionalProperties": false,
114+
"properties": {
115+
"uri": {
116+
"type": "string",
117+
"format": "uri-reference",
118+
"description": "A URI to the asset represented in this format."
119+
},
120+
"hash": {
121+
"type": "string",
122+
"description": "A checksum hash of the content of the asset in this format."
123+
},
124+
"mimeType": {
125+
"type": "string",
126+
"description": "Media (MIME) type of the format."
127+
},
128+
"fileSize": {
129+
"type": "integer",
130+
"description": "Size in bytes of the content of the asset in this format."
131+
},
132+
"fileName": {
133+
"type": "string",
134+
"description": "Filename for the asset in this format. For display purposes."
135+
},
136+
"duration": {
137+
"type": "string",
138+
"format": "time",
139+
"description": "Time duration of the content of the asset in this format."
140+
},
141+
"dimensions": {
142+
"$ref": "#/definitions/dimensions",
143+
"description": "Dimensions of the content of the asset in this format."
144+
},
145+
"dataRate": {
146+
"$ref": "#/definitions/dataRate",
147+
"description": "Data rate which the content of the asset in this format was captured at."
148+
}
149+
}
150+
},
151+
"attribute": {
152+
"type": "object",
153+
"additionalProperties": false,
154+
"properties": {
155+
"trait_type": {
156+
"type": "string",
157+
"description": "Name of the trait."
158+
},
159+
"value": {
160+
"description": "Value of the trait.",
161+
"oneOf": [
162+
{ "type": "string" },
163+
{ "type": "number" }
164+
]
165+
},
166+
"display_type": {
167+
"type": "string",
168+
"description": "Display type hint for the trait (for example, number, boost_percentage, boost_number, date)."
169+
}
170+
},
171+
"required": [
172+
"trait_type",
173+
"value"
174+
]
175+
},
176+
"dataRate": {
177+
"type": "object",
178+
"additionalProperties": false,
179+
"properties": {
180+
"value": {
181+
"type": "integer"
182+
},
183+
"unit": {
184+
"type": "string"
185+
}
186+
},
187+
"required": [
188+
"unit",
189+
"value"
190+
]
191+
},
192+
"dimensions": {
193+
"type": "object",
194+
"additionalProperties": false,
195+
"properties": {
196+
"value": {
197+
"type": "string"
198+
},
199+
"unit": {
200+
"type": "string"
201+
}
202+
},
203+
"required": [
204+
"unit",
205+
"value"
206+
]
207+
}
208+
}
209+
}

0 commit comments

Comments
 (0)