Skip to content

Commit

Permalink
Merge pull request #1436 from oasisprotocol/ml/nfts-doc
Browse files Browse the repository at this point in the history
Add NFTs documentation
  • Loading branch information
lubej authored Jun 11, 2024
2 parents f9b0642 + b463d0a commit 7336f91
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changelog/1436.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add NFTs documentation
2 changes: 2 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ line-length:
line_length: 80
# Allow longer lines for code blocks.
code_block_line_length: 100
# Ignore on tables
tables: false

# Do not always require language specifiers with fenced code blocks since they
# are not part of the Markdown spec.
Expand Down
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ The official deployment of Oasis Explorer lives at <https://explorer.oasis.io>.

Development deploy is available at <https://explorer.dev.oasis.io>.

## Features

- **Transaction History**: Allows you to view the complete transaction history
of a specific blockchain* address.
- **Block Contents**: Enables you to examine the contents of individual blocks.
This includes information like the transactions in the block, the total block
size, and the block's hash data.
- **Transaction Verification**: Lets you verify the status of a transaction. You
can confirm whether a transaction has been validated by the network and
included in a block.
- **Blockchain Statistics**: Provides overall statistics regarding the
blockchain* such as the total number of transactions, and the number of blocks
already created.
- **Address Balance**: Enables you to see the balance of any blockchain*
address.
- **Network Nodes**: Provides information about the nodes in the blockchain*
network.
- **Search engine**: Enables you to lookup tokens, addresses, names, blocks and
transactions;
- **Non-Fungible Tokens (NFTs)**: Provides information about NFT ownership,
metadata, transactions history and minting information. (
See [more...](./docs/NFTs.md))
- **Contract Reading and Writing** *(upcoming)*: Can read contract details and
record new contract interactions.

*blockchain: ParaTime layer/s or Consensus

## Getting started

### Installing and running Oasis Explorer
Expand Down Expand Up @@ -58,7 +85,7 @@ A quick summary:
- Use the present tense ("Add feature" not "Added feature").
- Use the imperative mood ("Move component to..." not "Moves component to...").
- Wrap the body at 80 characters.
- Use the body to explain _what_ and _why_ vs. _how_.
- Use the body to explain *what* and *why* vs. *how*.

A detailed post on Git commit messages: [How To Write a Git Commit Message].

Expand Down
69 changes: 69 additions & 0 deletions docs/NFTs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Non-Fungible Tokens (NFTs)

## Features

- **NFT Ownership**: Indicates which address currently owns a particular NFT.
- **NFT Metadata**: Displays metadata associated with the NFT, such as name,
description, image defined in the token's contract.
- **Transaction History**: Shows the transaction history of the NFT, allowing
you to see past owners and sales prices.
- **Minting Information**: The time and block of when NFT was minted.

## NFT Metadata support

As of the time this documentation was written, our Explorer is designed to
support only the
official [ERC-721](https://github.com/ethereum/ERCs/blob/master/ERCS/erc-721.md)
metadata standard, as per Ethereum's
specifications.

At present, our system primarily supports the display of image type assets with
a preview feature. These image types can
reside on a variety of hosting platforms, including `https`, `ipfs` or
they can even be Base64 encoded (data:
image/*).

However, it's important to note that this does not imply a lack of support for
other types of assets. We do accommodate
a wide range of asset types, but instead of a preview, a link to the asset will
be provided. If a user clicks on this
link, they will be redirected to a new tab where the asset will be displayed.
For instance, if the asset is a video, it
will be played in the new tab, and if the native browser supports it, an
accurate preview of an asset will be shown.

### Properties support

The table herein outlines the properties that are specifically parsed/rendered
in our Explorer. You have the ability to
view the complete metadata JSON in our dedicated metadata preview section.

| Property | Description |
|----------|---------------------------------------------------|
| _image_ | URL to the image, it can be any type of an image. |
| _name_ | Name of the asset. |

## Upcoming

Here is the proposed upcoming metadata structure. We kindly request that you
adhere to these guidelines to ensure that
your metadata is correctly interpreted and displayed within our explorer.

| Property | Description |
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| _image_ | URL to the image, it can be any type of an image. In the context of video content, this refers to a thumbnail representation of the respective video. |
| _name_ | Name of the asset. |
| _description_ | Description of the asset. |
| _attributes_ | Attributes of an asset. |
| _animation_url_ | URL to multi media asset. Our initial development plan includes support for video content. The incorporation of other media types is also under consideration and may be introduced at a future date, depending on the level of demand and usage requirements. |

Inspiration from
[source](https://docs.opensea.io/docs/metadata-standards#metadata-structure)

### Planned action items

- Add support for video assets
- Add support
for [ERC-1155](https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1155.md)
- Add attribute support
- Add support for different kind of assets(audio, documents,...)

0 comments on commit 7336f91

Please sign in to comment.