Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update base.md #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions standards/rmrk2.0.0/entities/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Example:
{
"id": "bg",
"src": "ipfs://ipfs/hash",
"thumb": "ipfs://ipfs/hash",
"type": "slot",
"equippable": ["collection_1", "collection_2"],
"z": 3
Expand Down Expand Up @@ -105,10 +104,6 @@ In extrinsic RMRK implementation, a Base is uniquely identified by the combinati

An optional IPFS Uri pointing to main media file of this part

#### `thumb` (string)

An optional ipfs Uri pointing to thumbnail media file of this part.

#### `type` (string)

A Base part can be of type `fixed` or `slot`. A compatible resource can be equipped in a `slot` part.
Expand All @@ -132,7 +127,6 @@ An optional ipfs Uri pointing to a [Metadata](./metadata.md) JSON.
Some fields on base parts can be saved off-chain using `metadata` field to save up on on-chain storage. The on-chain fields should always be used if present regardless of metadata content.

- If a base part has `metadata` field but no `src` field, then [mediaUri](./metadata.md#mediauri-string) field from metadata is used instead as a main media file of that part.
- If a base part has `metadata` field but no `thumb` field, then [thumbnailUri](./metadata.md#thumbnailuri-string) field from metadata is used instead as a thumbnail file of that part.
- If a base part has `metadata` field but no `z` field, then [z](./metadata.md#z-number) field from the properties of metadata JSON is used instead.
- If a base part has `metadata` field but no `type` field, then [type](./metadata.md#type-string) field from the metadata JSON is used instead. It is strongly recommended keeping `type` on part rather than on metadata to aid with querying.

Expand All @@ -148,7 +142,6 @@ Some fields on base parts can be saved off-chain using `metadata` field to save
{
"id": "bg",
"src": "ipfs://ipfs/hash",
"thumb": "ipfs://ipfs/hash",
"type": "slot",
"equippable": ["collection_1", "collection_2"],
"z": 3
Expand Down Expand Up @@ -189,7 +182,11 @@ And the content of metadata would be
"z": {
"type": "int",
"value": 2
}
},
"zName": {
"type": "string",
"value": "Hats"
},
}
}
```
Expand Down
7 changes: 6 additions & 1 deletion standards/rmrk2.0.0/entities/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ _Note that base part's spec also allows you to add `type: "slot"` media file and
"z": {
"type": "int",
"value": 2
},
"zName": {
"type": "string",
"value": "Hats"
}
}
}
Expand Down Expand Up @@ -184,7 +188,8 @@ _Note that base part's spec also allows you to add `type: "slot"` media file and
},
"z": {
"type": "int",
"value": 2
"value": 2,
"name": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove

},
"mimeType": {
"type": "string",
Expand Down