機能
トークン標準
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です。
| Field | Type | Description |
|---|---|---|
| name | string | Name of the asset. |
| symbol | string | Symbol of the asset. |
| description | string | Description of the asset. |
| image | string | URI pointing to the asset's logo. |
FungibleアセT標準
これらはより広範なメタデータと供給量>= 0を持つFungibleトークンです。この種のトークンの例は、コミュニティが「半Fungibleトークン」と呼んでいるもので、剣や木の切れ端などの属性が重いゲーム内アイテムを表すためによく使用されます。
| Field | Type | Description |
|---|---|---|
| name | string | Name of the asset. |
| description | string | Description of the asset. |
| image | string | URI pointing to the asset's logo. |
| animation_url | string | URI pointing to the asset's animation. |
| external_url | string | URI pointing to an external URL defining the asset — e.g. the game's main site. |
| attributes | array | Array of attributes defining the characteristics of the asset.
|
| properties | object | Additional properties that define the asset.
|
非Fungible標準
これらは、コミュニティがすでに馴染みがある「標準的な」非Fungibleトークンで、Metadata PDAとMaster Edition(またはEdition)PDAの両方を持ちます。これらの例には、Solana Monkey Business、Stylish Studs、Thugbirdzがあります。
| Field | Type | Description |
|---|---|---|
| name | string | Name of the asset. |
| description | string | Description of the asset. |
| image | string | URI pointing to the asset's logo. |
| animation_url | string | URI pointing to the asset's animation. |
| external_url | string | URI pointing to an external URL defining the asset — e.g. the game's main site. |
| attributes | array | Array of attributes defining the characteristics of the asset.
|
| properties | object | Additional properties that define the asset.
|
プログラマブル非Fungible標準
この標準は上記の非Fungible標準と似ていますが、基礎となるトークンアカウントが常時フリーズされ、Token Metadataプログラムを通さずに誰もプログラマブルNFTを転送、ロック、またはバーンできないようになっている点が異なります。これにより、クリエイターは2次売買のロイヤルティを強制するなど、NFTのカスタム認可ルールを定義できます。
プログラマブルNFTについてはこちらで詳しく読むことができます。
| Field | Type | Description |
|---|---|---|
| name | string | Name of the asset. |
| description | string | Description of the asset. |
| image | string | URI pointing to the asset's logo. |
| animation_url | string | URI pointing to the asset's animation. |
| external_url | string | URI pointing to an external URL defining the asset — e.g. the game's main site. |
| attributes | array | Array of attributes defining the characteristics of the asset.
|
| properties | object | Additional properties that define the asset.
|
