Skip to content
Merged
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
56 changes: 53 additions & 3 deletions src/pages/en/dev-tools/cli/bubblegum/create-cnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ mplx bg nft create my-tree --name "My NFT" --uri "https://example.com/metadata.j
| `--animation <value>` | Path to animation/video file |
| `--project-url <value>` | External project URL |
| `--symbol <value>` | On-chain symbol |
| `--royalties <value>` | Royalty percentage (0-100) |
| `--collection <value>` | Collection mint address ([Metaplex Core collection](/smart-contracts/core/collections)) |
| `--royalties <value>` | Explicit leaf royalty % (0–100, decimals allowed e.g. `7.5`). Opts out of collection inherit |
| `--inherit-royalties` | Store inherit sentinel `65535` and empty leaf creators. Requires `--collection` with a Royalties plugin. Default when the collection has Royalties and you omit `--royalties`, `--creator`, and JSON `seller_fee_basis_points` |
| `--creator <address>:<share>` | Leaf payout split (repeatable; shares must sum to 100). For explicit-leaf mints, the default is payer @ 100%. Opts out of inherit even if `--royalties` is omitted. Incompatible with `--inherit-royalties` |
| `--collection <value>` | Core collection address (must have BubblegumV2). [Metaplex Core collections](/smart-contracts/core/collections) |
| `--owner <value>` | Leaf owner public key (defaults to payer) |

## Global Flags
Expand Down Expand Up @@ -102,7 +104,7 @@ mplx bg nft create my-tree \
--royalties 5
```

1. Create in a collection:
1. Create in a collection (auto-inherits royalties when the collection has a Royalties plugin):

```bash
mplx bg nft create my-tree \
Expand All @@ -111,6 +113,28 @@ mplx bg nft create my-tree \
--collection 7kPqYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

1. Force inherit from the collection Royalties plugin:

```bash
mplx bg nft create my-tree \
--name "Inherited cNFT" \
--uri "https://arweave.net/xxx" \
--collection 7kPqYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--inherit-royalties
```

1. Explicit leaf royalties with creator splits (opts out of inherit):

```bash
mplx bg nft create my-tree \
--name "Split cNFT" \
--uri "https://arweave.net/xxx" \
--collection 7kPqYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--royalties 7.5 \
--creator Addr111111111111111111111111111111111111111:60 \
--creator Addr222222222222222222222222222222222222222:40
```

## Output

```text
Expand All @@ -124,6 +148,7 @@ Compressed NFT Created!
Tree: my-tree
Owner: YourWalletAddressHere
Asset ID: CNFTAssetIdHere
Royalties: inherited (leaf sentinel 65535)

Signature: 5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Explorer: https://solscan.io/tx/5xxx...
Expand Down Expand Up @@ -154,6 +179,30 @@ When using `--json`, your metadata file should follow this structure:

The `image` field will be automatically populated with the uploaded image URI.

If `seller_fee_basis_points` is set, the CLI treats it as an explicit leaf rate and **does not inherit** from the collection.

## Inherited royalties {% #inherited-royalties %}

When minting into a Core collection that has a [Royalties plugin](/smart-contracts/core/plugins/royalties), the CLI can store the inherit sentinel (`65535`) and empty leaf creators instead of copying the collection rate onto every cNFT. DAS then resolves the collection rate for display. See [Reading Inherited Royalties](/smart-contracts/bubblegum-v2/reading-inherited-royalties).

Create a Bubblegum-ready collection with royalties:

```bash
mplx bg collection create \
--name "My Compressed Collection" \
--uri "https://example.com/collection.json" \
--royalties 5
```

| Intent | Flags |
|--------|--------|
| Auto-inherit | `--collection <COL>` and omit `--royalties`, `--creator`, and JSON `seller_fee_basis_points` |
| Force inherit | `--collection <COL> --inherit-royalties` |
| Explicit leaf rate | `--royalties <0-100>` (decimals ok). Opts out of inherit |
| Explicit splits | `--creator <ADDR>:<share>` (repeatable; shares sum to 100). Opts out of inherit even without `--royalties` (leaf rate is then `0%`) |

`--inherit-royalties` requires `--collection` with a Royalties plugin and cannot be combined with `--royalties`, `--creator`, or JSON `seller_fee_basis_points`. A plain `mplx core collection create` is not enough — the collection needs `BubblegumV2` (and Royalties, to inherit).

## Notes

- The tree argument can be either a saved tree name or a public key address
Expand All @@ -162,3 +211,4 @@ The `image` field will be automatically populated with the uploaded image URI.
- The RPC must support DAS API
- **Bubblegum V2 only** - These commands work with Bubblegum V2 trees and use [Metaplex Core collections](/smart-contracts/core/collections) (not Token Metadata collections)
- Attributes format: `"trait:value,trait:value"` - colons separate trait from value, commas separate pairs
- The wizard offers inherit vs explicit royalties when the selected collection has a Royalties plugin
9 changes: 7 additions & 2 deletions src/pages/en/dev-tools/cli/bubblegum/fetch-cnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ Merkle Proof:

Royalty:
Basis Points: 500 (5%)
Inherited: Yes (leaf sentinel 65535)
Primary Sale: No

Creators:
CreatorAddress1 (100%) ✓
Creators (display):
CollectionCreatorAddress (100%) ✓

Creators (leaf / raw):
(empty — typical when SFBP is inherited)

--------------------------------
```
Expand All @@ -130,3 +134,4 @@ When using `--download`, two files are created:
- Standard Solana RPC endpoints will fail with "Asset not found or RPC does not support DAS API"
- The merkle proof is essential for transfer, burn, and update operations
- The `--json` flag outputs machine-readable JSON for scripting
- For inherited royalties, `Royalty` / `Creators (display)` show the collection-resolved values. `Inherited` and `Creators (leaf / raw)` are diagnostic and appear only when DAS exposes `_raw` / `inherited`. Do not invent a sentinel if those fields are missing. Older DAS may omit `_raw` / `inherited` and return `royalty.basis_points: 65535` — that is the leaf inherit sentinel, not the collection-resolved rate. See [Reading Inherited Royalties](/smart-contracts/bubblegum-v2/reading-inherited-royalties)
16 changes: 11 additions & 5 deletions src/pages/en/dev-tools/cli/bubblegum/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ Bubblegum V2 uses [Metaplex Core collections](/smart-contracts/core/collections)
```bash
mplx bg collection create \
--name "My Compressed Collection" \
--uri "https://example.com/collection.json"
--uri "https://example.com/collection.json" \
--royalties 5
```

`--royalties` adds a Core Royalties plugin so later `mplx bg nft create --collection` mints can [inherit collection royalties](/dev-tools/cli/bubblegum/create-cnft#inherited-royalties) (leaf sentinel `65535`) instead of copying the rate onto every cNFT.

You can also use a vanity collection address with `--mint-keypair`:

```bash
Expand Down Expand Up @@ -83,16 +86,19 @@ mplx config rpcs add <name> <url>
mplx bg tree create --wizard
```

1. Create a collection (optional but recommended):
1. Create a Bubblegum-ready collection (optional but recommended). Pass `--royalties` so mints can inherit:

```bash
mplx core collection create --wizard
mplx bg collection create \
--name "My Compressed Collection" \
--uri "https://example.com/collection.json" \
--royalties 5
```

1. Mint compressed NFTs:
1. Mint compressed NFTs. Omit `--royalties` / `--creator` (and JSON `seller_fee_basis_points`) to auto-inherit:

```bash
mplx bg nft create my-tree --wizard
mplx bg nft create my-tree --name "cNFT #1" --uri "https://example.com/1.json" --collection <COL>
```

## Authority Model
Expand Down
1 change: 1 addition & 0 deletions src/pages/en/dev-tools/cli/bubblegum/update-cnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,4 @@ To update a compressed NFT, you must be either:
- The `--uri` flag is mutually exclusive with `--image`, `--description`, and `--editor`
- The `--editor` flag is mutually exclusive with all other update flags
- Editor uses `$EDITOR` environment variable, or defaults to nano/notepad
- For cNFTs minted with inherited royalties, update rebuilds leaf-canonical metadata (`65535` + empty creators) from SDK `currentMetadata` or DAS `royalty.basis_points_raw` / `creators_raw`. Do not write the display royalty % into the leaf — that breaks the hash. See [Reading Inherited Royalties](/smart-contracts/bubblegum-v2/reading-inherited-royalties)
54 changes: 51 additions & 3 deletions src/pages/ja/dev-tools/cli/bubblegum/create-cnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ mplx bg nft create my-tree --name "My NFT" --uri "https://example.com/metadata.j
| `--animation <value>` | アニメーション/動画ファイルへのパス |
| `--project-url <value>` | 外部プロジェクトURL |
| `--symbol <value>` | オンチェーンシンボル |
| `--royalties <value>` | ロイヤリティパーセンテージ(0-100) |
| `--collection <value>` | コレクションミントアドレス([Metaplex Coreコレクション](/smart-contracts/core/collections)) |
| `--royalties <value>` | 明示的なリーフロイヤリティ%(0–100、小数可 例: `7.5`)。コレクション継承をオプトアウト |
| `--inherit-royalties` | 継承センチネル `65535` と空のリーフクリエイターを保存。Royaltiesプラグイン付きの `--collection` が必要。コレクションにRoyaltiesがあり `--royalties`、`--creator`、JSON の `seller_fee_basis_points` を省略した場合のデフォルト |
| `--creator <address>:<share>` | リーフの分配(繰り返し可。シェア合計は100)。明示的リーフミントではデフォルトは支払者 100%。`--royalties` がなくても継承をオプトアウト。`--inherit-royalties` とは併用不可 |
| `--collection <value>` | Coreコレクションアドレス(BubblegumV2必須)。[Metaplex Coreコレクション](/smart-contracts/core/collections) |
| `--owner <value>` | リーフオーナーの公開鍵(デフォルトは支払者) |

## グローバルフラグ
Expand Down Expand Up @@ -102,7 +104,7 @@ mplx bg nft create my-tree --name "My NFT" --uri "https://example.com/metadata.j
--royalties 5
```

1. コレクションに作成:
1. コレクションに作成(Royaltiesプラグインがある場合は自動継承):

```bash
mplx bg nft create my-tree \
Expand All @@ -111,6 +113,28 @@ mplx bg nft create my-tree --name "My NFT" --uri "https://example.com/metadata.j
--collection 7kPqYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

1. コレクションのRoyaltiesプラグインから継承を強制:

```bash
mplx bg nft create my-tree \
--name "Inherited cNFT" \
--uri "https://arweave.net/xxx" \
--collection 7kPqYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--inherit-royalties
```

1. 明示的なリーフロイヤリティとクリエイター分配(継承をオプトアウト):

```bash
mplx bg nft create my-tree \
--name "Split cNFT" \
--uri "https://arweave.net/xxx" \
--collection 7kPqYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--royalties 7.5 \
--creator Addr111111111111111111111111111111111111111:60 \
--creator Addr222222222222222222222222222222222222222:40
```

## 出力

```text
Expand All @@ -124,6 +148,7 @@ Compressed NFT Created!
Tree: my-tree
Owner: YourWalletAddressHere
Asset ID: CNFTAssetIdHere
Royalties: inherited (leaf sentinel 65535)

Signature: 5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Explorer: https://solscan.io/tx/5xxx...
Expand Down Expand Up @@ -154,6 +179,28 @@ Explorer: https://solscan.io/tx/5xxx...

`image`フィールドはアップロードされた画像URIで自動的に入力されます。

`seller_fee_basis_points` が設定されている場合、CLIは明示的なリーフ料率として扱い、コレクションからは**継承しません**。

## 継承ロイヤリティ {% #inherited-royalties %}

[Royaltiesプラグイン](/smart-contracts/core/plugins/royalties)を持つ Core コレクションへミントする場合、CLIはコレクション料率を各cNFTにコピーする代わりに、継承センチネル(`65535`)と空のリーフクリエイターを保存できます。DASは表示用にコレクション料率を解決します。[継承ロイヤリティの読み取り](/smart-contracts/bubblegum-v2/reading-inherited-royalties)を参照してください。

```bash
mplx bg collection create \
--name "My Compressed Collection" \
--uri "https://example.com/collection.json" \
--royalties 5
```

| 意図 | フラグ |
|--------|--------|
| 自動継承 | `--collection <COL>` かつ `--royalties`、`--creator`、JSON の `seller_fee_basis_points` を省略 |
| 継承を強制 | `--collection <COL> --inherit-royalties` |
| 明示的なリーフ料率 | `--royalties <0-100>`(小数可)。継承をオプトアウト |
| 明示的な分配 | `--creator <ADDR>:<share>`(繰り返し可。合計100)。`--royalties` がなくても継承をオプトアウト(リーフ料率は `0%`) |

`--inherit-royalties` には Royalties プラグイン付きの `--collection` が必要で、`--royalties`、`--creator`、JSON の `seller_fee_basis_points` と併用できません。`mplx core collection create` だけでは不十分です。コレクションには `BubblegumV2`(継承する場合は Royalties)が必要です。

## 注意事項

- ツリー引数は保存されたツリー名または公開鍵アドレスのいずれかを使用できます
Expand All @@ -162,3 +209,4 @@ Explorer: https://solscan.io/tx/5xxx...
- RPCはDAS APIをサポートしている必要があります
- **Bubblegum V2のみ** - これらのコマンドはBubblegum V2ツリーで動作し、[Metaplex Coreコレクション](/smart-contracts/core/collections)を使用します(Token Metadataコレクションではありません)
- 属性形式:`"trait:value,trait:value"` - コロンでtraitとvalueを区切り、カンマでペアを区切ります
- 選択したコレクションにRoyaltiesプラグインがある場合、ウィザードは継承と明示的ロイヤリティを選択できます
9 changes: 7 additions & 2 deletions src/pages/ja/dev-tools/cli/bubblegum/fetch-cnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ Merkle Proof:

Royalty:
Basis Points: 500 (5%)
Inherited: Yes (leaf sentinel 65535)
Primary Sale: No

Creators:
CreatorAddress1 (100%) ✓
Creators (display):
CollectionCreatorAddress (100%) ✓

Creators (leaf / raw):
(empty — typical when SFBP is inherited)

--------------------------------
```
Expand All @@ -130,3 +134,4 @@ Creators:
- 標準のSolana RPCエンドポイントは「Asset not found or RPC does not support DAS API」で失敗します
- マークルプルーフは転送、バーン、更新操作に不可欠です
- `--json`フラグはスクリプト用の機械可読JSONを出力します
- 継承ロイヤリティでは `Royalty` / `Creators (display)` がコレクション解決値です。`Inherited` と `Creators (leaf / raw)` は診断用で、DAS が `_raw` / `inherited` を返す場合のみ表示されます。これらのフィールドが無いときにセンチネルを捏造しないでください。古い DAS は `_raw` / `inherited` を省略し `royalty.basis_points: 65535` を返すことがあります。これはリーフの継承センチネルであり、コレクション解決後の料率ではありません。[継承ロイヤリティの読み取り](/smart-contracts/bubblegum-v2/reading-inherited-royalties)
20 changes: 14 additions & 6 deletions src/pages/ja/dev-tools/cli/bubblegum/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ Bubblegumは、従来のNFTよりもはるかに低コストでNFTを作成で
- 操作に必要なプルーフサイズ

### コレクション
Bubblegum V2は[Metaplex Coreコレクション](/smart-contracts/core/collections)を使用します(Token Metadataコレクションではありません)。まずCoreコレクションを作成してください:
Bubblegum V2は[Metaplex Coreコレクション](/smart-contracts/core/collections)を使用します。Bubblegum V2プラグイン付きのCoreコレクションを作成します:

```bash
mplx core collection create --wizard
mplx bg collection create \
--name "My Compressed Collection" \
--uri "https://example.com/collection.json" \
--royalties 5
```

`--royalties` は Core Royalties プラグインを追加し、後続の `mplx bg nft create --collection` が[コレクションロイヤリティを継承](/dev-tools/cli/bubblegum/create-cnft#inherited-royalties)できるようにします(リーフセンチネル `65535`)。

### RPC要件

圧縮NFT操作には、[DAS(Digital Asset Standard)API](/solana/rpcs-and-das#metaplex-das-api)をサポートするRPCエンドポイントが必要です。標準のSolana RPCエンドポイントはDASをサポートしておらず、圧縮NFTの取得、更新、転送、バーンには機能しません。
Expand Down Expand Up @@ -68,16 +73,19 @@ mplx bg <resource> <command> [options]
mplx bg tree create --wizard
```

1. コレクションを作成(オプションですが推奨):
1. Bubblegum対応コレクションを作成(オプションですが推奨)。継承するには `--royalties` を付けます:

```bash
mplx core collection create --wizard
mplx bg collection create \
--name "My Compressed Collection" \
--uri "https://example.com/collection.json" \
--royalties 5
```

1. 圧縮NFTをミント:
1. 圧縮NFTをミント。自動継承するには `--royalties` / `--creator`(および JSON の `seller_fee_basis_points`)を省略します:

```bash
mplx bg nft create my-tree --wizard
mplx bg nft create my-tree --name "cNFT #1" --uri "https://example.com/1.json" --collection <COL>
```

## 権限モデル
Expand Down
1 change: 1 addition & 0 deletions src/pages/ja/dev-tools/cli/bubblegum/update-cnft.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ Updating compressed NFT... ✓
- `--uri`フラグは`--image`、`--description`、`--editor`と排他的です
- `--editor`フラグは他のすべての更新フラグと排他的です
- エディタは`$EDITOR`環境変数を使用するか、デフォルトでnano/notepadを使用します
- 継承ロイヤリティでミントされたcNFTの更新では、SDK の `currentMetadata` または DAS の `royalty.basis_points_raw` / `creators_raw` からリーフ正規メタデータ(`65535` + 空のクリエイター)を再構築します。表示用のロイヤリティ%をリーフに書き込まないでください。ハッシュが壊れます。[継承ロイヤリティの読み取り](/smart-contracts/bubblegum-v2/reading-inherited-royalties)
2 changes: 1 addition & 1 deletion src/pages/ja/smart-contracts/bubblegum-v2/mint-cnfts.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ await createCollection(umi, {
{% /dialect %}
{% /dialect-switcher %}

## コレクションからロイヤリティを継承する
## コレクションからロイヤリティを継承する {% #inheriting-royalties-from-the-collection %}

MPL-Coreコレクションにミントする場合、コレクションのロイヤリティ率をすべてのcNFTにコピーする代わりに、リーフに**センチネル**のセラーフィーベーシスポイント値(`65535`、`SELLER_FEE_BASIS_POINTS_INHERIT` / `0xffff` としてエクスポート)を保存できます。DASは表示用に `royalty.basis_points` / `creators` にコレクションから解決された料率を置き、`royalty.basis_points_raw` / `creators_raw` にリーフセンチネルを置き(`royalty.inherited: true`)、オンチェーンのリーフはハッシュ化のためにセンチネルを保持します。

Expand Down
Loading
Loading