機能

トークン標準

Solanaでのトークンの使用が進化するにつれて、単純に「Fungible」と「非Fungible」トークンだけでなく、より多くの種類のトークンがあることが明らかになりました。

例として、コミュニティが「半Fungibleトークン」と呼んでいるものがあります。これは供給量が1より大きいSPLトークンですが、JSONメタデータに画像や属性配列などの典型的なNFT属性があるものです。

コンセンサスでは、これらは標準NFTと同じビューでウォレットに保存されるか、独自のビューで保存されるが「標準の」FungibleなSPLトークン(USDCなど)とは分離されるべきだということのようです。これらのトークンは、剣や木の切れ端などのFungibleなアイテムをサポートするためにゲームコンテキストで人気になっていますが、USDCなどの典型的なFungible SPLトークンとは別のリーグにあります。

トークン標準フィールド

この特定の用途をサポートするだけでなく、将来的に他のトークンタイプへの拡張を可能にする十分な広さを持つ標準にするために、MetadataアカウントのToken Standard列挙型を使用してトークンのFungibility性を追跡します。このフィールドは特定のJSON標準にマップされ、トークンタイプを客観的に区別するために使用されます。

これは、このフィールドの前にはNFTであるものとないものを判断するために一貫性のないヒューリスティックを適用しなければならなかったウォレットなどのサードパーティにとっての痛点を解決します。

トークン標準フィールドは以下の値を持つことができます:

  • 0 / NonFungible: Master Editionを持つ非Fungibleトークン。
  • 1 / FungibleAsset (1): 属性も持つことができるメタデータを持つトークン、時には半Fungibleと呼ばれます。
  • 2 / Fungible (2): シンプルなメタデータを持つトークン。
  • 3 / NonFungibleEdition (3): Editionアカウント(Master editionから印刷された)を持つ非Fungibleトークン。
  • 4 / ProgrammableNonFungible (4): カスタム認可ルールを強制するために常時フリーズされる特殊なNonFungibleトークン。

トークン標準はToken Metadataプログラムによって自動的に設定され、手動で更新することはできないことに注意することが重要です。正しい標準を適用するために以下のロジックを使用します:

  • トークンにMaster Editionアカウントがある場合、それはNonFungibleまたはProgrammableNonFungibleです。
  • トークンにEditionアカウントがある場合、それはNonFungibleEditionです。
  • トークンに(Master)Editionアカウントがない(供給量が> 1であることを保証)場合で、小数点以下0桁を使用する場合、それはFungibleAssetです。
  • トークンに(Master)Editionアカウントがない(供給量が> 1であることを保証)場合で、少なくとも1つの小数点以下を使用する場合、それはFungibleです。

各トークン標準タイプには、以下で定義される独自のJSONスキーマがあります。

Fungible標準

これらは限定されたメタデータと供給量>= 0を持つシンプルなSPLトークンです。例はUSDC、GBTC、RAYです。

FieldTypeDescription
namestringName of the asset.
symbolstringSymbol of the asset.
descriptionstringDescription of the asset.
imagestringURI pointing to the asset's logo.

FungibleアセT標準

これらはより広範なメタデータと供給量>= 0を持つFungibleトークンです。この種のトークンの例は、コミュニティが「半Fungibleトークン」と呼んでいるもので、剣や木の切れ端などの属性が重いゲーム内アイテムを表すためによく使用されます。

FieldTypeDescription
namestringName of the asset.
descriptionstringDescription of the asset.
imagestringURI pointing to the asset's logo.
animation_urlstringURI pointing to the asset's animation.
external_urlstringURI pointing to an external URL defining the asset — e.g. the game's main site.
attributesarrayArray of attributes defining the characteristics of the asset.
  • trait_type (string): The type of attribute.
  • value (string): The value for that attribute.
propertiesobjectAdditional properties that define the asset.
  • files (array): Additional files to include with the asset.
    • uri (string): The file's URI.
    • type (string): The file's type. E.g. image/png, video/mp4, etc.
    • cdn (boolean, optional): Whether the file is served from a CDN.
  • category (string): A media category for the asset. E.g. video, image, etc.

非Fungible標準

これらは、コミュニティがすでに馴染みがある「標準的な」非Fungibleトークンで、Metadata PDAとMaster Edition(またはEdition)PDAの両方を持ちます。これらの例には、Solana Monkey Business、Stylish Studs、Thugbirdzがあります。

FieldTypeDescription
namestringName of the asset.
descriptionstringDescription of the asset.
imagestringURI pointing to the asset's logo.
animation_urlstringURI pointing to the asset's animation.
external_urlstringURI pointing to an external URL defining the asset — e.g. the game's main site.
attributesarrayArray of attributes defining the characteristics of the asset.
  • trait_type (string): The type of attribute.
  • value (string): The value for that attribute.
propertiesobjectAdditional properties that define the asset.
  • files (array): Additional files to include with the asset.
    • uri (string): The file's URI.
    • type (string): The file's type. E.g. image/png, video/mp4, etc.
    • cdn (boolean, optional): Whether the file is served from a CDN.
  • category (string): A media category for the asset. E.g. video, image, etc.

プログラマブル非Fungible標準

この標準は上記の非Fungible標準と似ていますが、基礎となるトークンアカウントが常時フリーズされ、Token Metadataプログラムを通さずに誰もプログラマブルNFTを転送、ロック、またはバーンできないようになっている点が異なります。これにより、クリエイターは2次売買のロイヤルティを強制するなど、NFTのカスタム認可ルールを定義できます。

プログラマブルNFTについてはこちらで詳しく読むことができます

FieldTypeDescription
namestringName of the asset.
descriptionstringDescription of the asset.
imagestringURI pointing to the asset's logo.
animation_urlstringURI pointing to the asset's animation.
external_urlstringURI pointing to an external URL defining the asset — e.g. the game's main site.
attributesarrayArray of attributes defining the characteristics of the asset.
  • trait_type (string): The type of attribute.
  • value (string): The value for that attribute.
propertiesobjectAdditional properties that define the asset.
  • files (array): Additional files to include with the asset.
    • uri (string): The file's URI.
    • type (string): The file's type. E.g. image/png, video/mp4, etc.
    • cdn (boolean, optional): Whether the file is served from a CDN.
  • category (string): A media category for the asset. E.g. video, image, etc.