From 80e3a83f060664ab36d73eeb4db155f179b7778b Mon Sep 17 00:00:00 2001 From: Brandon Tulsi <18336973+brandontulsi@users.noreply.github.com> Date: Fri, 25 Sep 2026 11:33:40 -0700 Subject: [PATCH] fix(genesis): pass creatorFeeShare in the Raydium fee-collect examples metaplex-foundation/genesis#465 made `creatorFeeShare` a required account on `collectRaydiumCpmmFeesWithCreatorFeeV2`. The 0.43.0 client requires it and the program that checks it is live on mainnet and devnet, so the collect examples no longer compile or land on-chain. - Pass `creatorFeeShare: pdas.creatorFeeShare` in both collect examples - Require `@metaplex-foundation/genesis` 0.43.0 or later - Note the account, the `InvalidRaydiumCreatorFeeShare` (260) and `NotEnoughAccountKeys` failures, and bump `updated` (en/ja/ko/zh) --- src/pages/en/smart-contracts/genesis/creator-fees.md | 9 ++++++--- src/pages/ja/smart-contracts/genesis/creator-fees.md | 9 ++++++--- src/pages/ko/smart-contracts/genesis/creator-fees.md | 9 ++++++--- src/pages/zh/smart-contracts/genesis/creator-fees.md | 9 ++++++--- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/pages/en/smart-contracts/genesis/creator-fees.md b/src/pages/en/smart-contracts/genesis/creator-fees.md index e6e06e738..db84b7cf0 100644 --- a/src/pages/en/smart-contracts/genesis/creator-fees.md +++ b/src/pages/en/smart-contracts/genesis/creator-fees.md @@ -34,7 +34,7 @@ programmingLanguage: - Bash proficiencyLevel: Intermediate created: '04-09-2026' -updated: '04-24-2026' +updated: '09-25-2026' howToSteps: - Set creatorFeeWallet in the launch object when calling createAndRegisterLaunch - After launch, monitor creatorFeeAccrued in the bucket account using fetchBondingCurveBucketV2 @@ -120,7 +120,7 @@ This table summarizes when to call each fee instruction, the accounts it require You must have the Genesis SDK, a configured Umi instance, and a funded Solana wallet. -- `@metaplex-foundation/genesis` SDK installed +- `@metaplex-foundation/genesis` SDK 0.43.0 or later installed (earlier versions omit the `creatorFeeShare` account that `collectRaydiumCpmmFeesWithCreatorFeeV2` requires) - A Umi instance configured with your keypair identity — see [Launching a Bonding Curve via the Metaplex API](/smart-contracts/genesis/bonding-curve-launch#umi-setup) - A funded Solana wallet for transaction fees @@ -322,6 +322,7 @@ await collectRaydiumCpmmFeesWithCreatorFeeV2(umi, { baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, }).sendAndConfirm(umi); console.log('Raydium LP fees collected into Genesis bucket'); @@ -417,6 +418,7 @@ await transactionBuilder() baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, })) .add(claimRaydiumCreatorFeeV2(umi, { genesisAccount, @@ -432,12 +434,13 @@ console.log('Raydium creator fees collected and claimed to:', creatorFeeWallet.t ## Notes -These caveats cover fee timing, the recommended API claim path, permissionless on-chain claiming, the two-step post-graduation flow, and first-buy fee waivers. +These caveats cover fee timing, the recommended API claim path, permissionless on-chain claiming, the two-step post-graduation flow, the required `creatorFeeShare` account, and first-buy fee waivers. - Creator fees accrue in the bucket (`creatorFeeAccrued`) on each swap, not transferred immediately — explicitly claim them via the API/SDK or the on-chain instructions; `creatorFeeClaimed` tracks the cumulative total claimed to date - `claimCreatorRewards` (API/SDK) aggregates every eligible bonding-curve and Raydium bucket for a wallet into a single call; when there is nothing to claim it returns HTTP `400` with `"No rewards available to claim"` rather than an empty transactions array - The on-chain claim instructions (`claimBondingCurveCreatorFeeV2`, `collectRaydiumCpmmFeesWithCreatorFeeV2`, `claimRaydiumCreatorFeeV2`) are permissionless: any wallet can trigger them, but the SOL always goes to the configured creator fee wallet, not the caller - Post-graduation fees require two steps in order: `collectRaydiumCpmmFeesWithCreatorFeeV2` (harvest from Raydium pool → Genesis bucket), then `claimRaydiumCreatorFeeV2` (bucket → creator wallet); both can be combined in a single transaction, and the API path wraps both for you +- `collectRaydiumCpmmFeesWithCreatorFeeV2` requires a `creatorFeeShare` account (Raydium's `CreatorFeeShare` PDA for the Genesis Raydium signer and the pool's AMM config), which does not need to exist on-chain; pass `pdas.creatorFeeShare` from the same `deriveRaydiumPDAsV2` call that supplies `ammConfig` — a mismatched account fails with `InvalidRaydiumCreatorFeeShare` (error 260), and SDK versions before 0.43.0 fail with `NotEnoughAccountKeys` - `creatorFeeAccrued` and `creatorFeeClaimed` exist on both `BondingCurveBucketV2` (active curve) and `RaydiumCpmmBucketV2` (post-graduation); use `fetchBondingCurveBucketV2` and `fetchRaydiumCpmmBucketV2` respectively - `creatorFeeWallet` defaults to the launching wallet if not set; it cannot be changed after the curve is created - The first buy mechanism waives all fees (protocol and creator) for the designated initial purchase only; all subsequent swaps pay the normal creator fee diff --git a/src/pages/ja/smart-contracts/genesis/creator-fees.md b/src/pages/ja/smart-contracts/genesis/creator-fees.md index 08848dbb5..4a47e93cf 100644 --- a/src/pages/ja/smart-contracts/genesis/creator-fees.md +++ b/src/pages/ja/smart-contracts/genesis/creator-fees.md @@ -34,7 +34,7 @@ programmingLanguage: - Bash proficiencyLevel: Intermediate created: '04-09-2026' -updated: '04-24-2026' +updated: '09-25-2026' howToSteps: - createAndRegisterLaunch の呼び出し時にローンチオブジェクトで creatorFeeWallet を設定します - ローンチ後、fetchBondingCurveBucketV2 を使用してバケットアカウントの creatorFeeAccrued を監視します @@ -120,7 +120,7 @@ faqs: Genesis SDK、設定済みのUmiインスタンス、および入金済みのSolanaウォレットが必要です。 -- `@metaplex-foundation/genesis` SDKインストール済み +- `@metaplex-foundation/genesis` SDK 0.43.0以降をインストール済み(それ以前のバージョンには、`collectRaydiumCpmmFeesWithCreatorFeeV2` に必要な `creatorFeeShare` アカウントが含まれません) - キーペアIDで設定されたUmiインスタンス — [Metaplex APIを通じたボンディングカーブのローンチ](/smart-contracts/genesis/bonding-curve-launch#umi-setup)を参照 - トランザクション手数料のための入金済みSolanaウォレット @@ -322,6 +322,7 @@ await collectRaydiumCpmmFeesWithCreatorFeeV2(umi, { baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, }).sendAndConfirm(umi); console.log('Raydium LP fees collected into Genesis bucket'); @@ -417,6 +418,7 @@ await transactionBuilder() baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, })) .add(claimRaydiumCreatorFeeV2(umi, { genesisAccount, @@ -432,12 +434,13 @@ console.log('Raydium creator fees collected and claimed to:', creatorFeeWallet.t ## Notes -以下の注意事項は、手数料のタイミング、推奨されるAPI請求パス、パーミッションレスなオンチェーン請求、2ステップのグラデュエーション後フロー、およびファーストバイの手数料免除について説明します。 +以下の注意事項は、手数料のタイミング、推奨されるAPI請求パス、パーミッションレスなオンチェーン請求、2ステップのグラデュエーション後フロー、必須の `creatorFeeShare` アカウント、およびファーストバイの手数料免除について説明します。 - クリエイター手数料は各スワップでバケット(`creatorFeeAccrued`)に蓄積されますが、すぐには転送されません — API/SDKまたはオンチェーンインストラクションで明示的に請求する必要があります。`creatorFeeClaimed` は累計の請求済み合計を追跡します - `claimCreatorRewards`(API/SDK)は、ウォレットの対象となるすべてのボンディングカーブとRaydiumバケットを1回の呼び出しに集約します。請求するものがない場合、空のトランザクション配列ではなくHTTP `400` と `"No rewards available to claim"` を返します - オンチェーン請求インストラクション(`claimBondingCurveCreatorFeeV2`、`collectRaydiumCpmmFeesWithCreatorFeeV2`、`claimRaydiumCreatorFeeV2`)はパーミッションレスです。どのウォレットでもトリガーできますが、SOLは常に設定されたクリエイター手数料ウォレットに送られ、呼び出し元には送られません - グラデュエーション後の手数料には順序通り2つのステップが必要です:`collectRaydiumCpmmFeesWithCreatorFeeV2`(Raydiumプール → Genesisバケットへの収集)、次に `claimRaydiumCreatorFeeV2`(バケット → クリエイターウォレット)。両方を1つのトランザクションにまとめることができ、APIパスは両方をまとめて処理します +- `collectRaydiumCpmmFeesWithCreatorFeeV2` には `creatorFeeShare` アカウント(Genesis Raydium署名者とプールのAMMコンフィグに対応するRaydiumの `CreatorFeeShare` PDA)が必要ですが、このアカウントがオンチェーンに存在している必要はありません。`ammConfig` を取得したのと同じ `deriveRaydiumPDAsV2` 呼び出しの `pdas.creatorFeeShare` を渡してください — 一致しないアカウントは `InvalidRaydiumCreatorFeeShare`(エラー260)で失敗し、0.43.0より前のSDKバージョンは `NotEnoughAccountKeys` で失敗します - `creatorFeeAccrued` と `creatorFeeClaimed` は `BondingCurveBucketV2`(アクティブカーブ)と `RaydiumCpmmBucketV2`(グラデュエーション後)の両方に存在します。それぞれ `fetchBondingCurveBucketV2` と `fetchRaydiumCpmmBucketV2` を使用します - `creatorFeeWallet` は設定されていない場合デフォルトでローンチウォレットになります。カーブ作成後は変更できません - ファーストバイの仕組みは、指定された初回購入のみすべての手数料(プロトコルとクリエイター)を免除します。その後のすべてのスワップは通常のクリエイター手数料を支払います diff --git a/src/pages/ko/smart-contracts/genesis/creator-fees.md b/src/pages/ko/smart-contracts/genesis/creator-fees.md index ea31d932a..0189951c7 100644 --- a/src/pages/ko/smart-contracts/genesis/creator-fees.md +++ b/src/pages/ko/smart-contracts/genesis/creator-fees.md @@ -34,7 +34,7 @@ programmingLanguage: - Bash proficiencyLevel: Intermediate created: '04-09-2026' -updated: '04-24-2026' +updated: '09-25-2026' howToSteps: - createAndRegisterLaunch 호출 시 런치 객체에 creatorFeeWallet을 설정합니다 - 런치 후 fetchBondingCurveBucketV2를 사용하여 버킷 계정의 creatorFeeAccrued를 모니터링합니다 @@ -120,7 +120,7 @@ faqs: Genesis SDK, 구성된 Umi 인스턴스 및 충전된 Solana 지갑이 필요합니다. -- `@metaplex-foundation/genesis` SDK 설치 +- `@metaplex-foundation/genesis` SDK 0.43.0 이상 설치 (이전 버전에는 `collectRaydiumCpmmFeesWithCreatorFeeV2`에 필요한 `creatorFeeShare` 계정이 포함되지 않습니다) - 키페어 ID로 구성된 Umi 인스턴스 — [Metaplex API를 통한 본딩 커브 런칭](/smart-contracts/genesis/bonding-curve-launch#umi-setup)을 참조하세요 - 트랜잭션 수수료를 위한 충전된 Solana 지갑 @@ -322,6 +322,7 @@ await collectRaydiumCpmmFeesWithCreatorFeeV2(umi, { baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, }).sendAndConfirm(umi); console.log('Raydium LP fees collected into Genesis bucket'); @@ -417,6 +418,7 @@ await transactionBuilder() baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, })) .add(claimRaydiumCreatorFeeV2(umi, { genesisAccount, @@ -432,12 +434,13 @@ console.log('Raydium creator fees collected and claimed to:', creatorFeeWallet.t ## 참고 사항 -다음 주의사항은 수수료 타이밍, 권장 API 청구 경로, 권한 없는 온체인 청구, 2단계 졸업 후 흐름 및 첫 번째 구매 수수료 면제에 대해 설명합니다. +다음 주의사항은 수수료 타이밍, 권장 API 청구 경로, 권한 없는 온체인 청구, 2단계 졸업 후 흐름, 필수 `creatorFeeShare` 계정 및 첫 번째 구매 수수료 면제에 대해 설명합니다. - 창작자 수수료는 각 스왑에서 버킷(`creatorFeeAccrued`)에 누적되며 즉시 전송되지 않습니다 — API/SDK 또는 온체인 명령어로 명시적으로 청구해야 합니다; `creatorFeeClaimed`는 현재까지 청구된 누적 합계를 추적합니다 - `claimCreatorRewards`(API/SDK)는 지갑이 자격이 있는 모든 본딩 커브와 Raydium 버킷을 한 번의 호출에 집계합니다; 청구할 것이 없으면 빈 트랜잭션 배열이 아니라 HTTP `400`과 `"No rewards available to claim"`을 반환합니다 - 온체인 청구 명령어(`claimBondingCurveCreatorFeeV2`, `collectRaydiumCpmmFeesWithCreatorFeeV2`, `claimRaydiumCreatorFeeV2`)는 권한 없이 호출 가능합니다: 어떤 지갑도 트리거할 수 있지만 SOL은 항상 구성된 창작자 수수료 지갑으로 전송됩니다 - 졸업 후 수수료는 순서대로 두 단계가 필요합니다: `collectRaydiumCpmmFeesWithCreatorFeeV2`(Raydium 풀 → Genesis 버킷으로 수집), 그 다음 `claimRaydiumCreatorFeeV2`(버킷 → 창작자 지갑); 두 단계를 단일 트랜잭션으로 결합할 수 있고, API 경로는 두 단계를 래핑합니다 +- `collectRaydiumCpmmFeesWithCreatorFeeV2`에는 `creatorFeeShare` 계정(Genesis Raydium 서명자와 풀의 AMM 구성에 대한 Raydium의 `CreatorFeeShare` PDA)이 필요하지만, 이 계정이 온체인에 존재할 필요는 없습니다; `ammConfig`를 제공하는 것과 동일한 `deriveRaydiumPDAsV2` 호출의 `pdas.creatorFeeShare`를 전달하세요 — 일치하지 않는 계정은 `InvalidRaydiumCreatorFeeShare`(오류 260)로 실패하고, 0.43.0 이전 SDK 버전은 `NotEnoughAccountKeys`로 실패합니다 - `creatorFeeAccrued`와 `creatorFeeClaimed`는 `BondingCurveBucketV2`(활성 커브)와 `RaydiumCpmmBucketV2`(졸업 후) 모두에 존재합니다; 각각 `fetchBondingCurveBucketV2`와 `fetchRaydiumCpmmBucketV2`를 사용하세요 - `creatorFeeWallet`은 설정하지 않으면 런칭 지갑으로 기본 설정됩니다; 커브가 생성된 후에는 변경할 수 없습니다 - 첫 번째 구매 메커니즘은 지정된 초기 구매에 대해서만 모든 수수료(프로토콜 및 창작자)를 면제합니다; 이후 모든 스왑은 일반 창작자 수수료를 납부합니다 diff --git a/src/pages/zh/smart-contracts/genesis/creator-fees.md b/src/pages/zh/smart-contracts/genesis/creator-fees.md index 81e3b48b1..b02478439 100644 --- a/src/pages/zh/smart-contracts/genesis/creator-fees.md +++ b/src/pages/zh/smart-contracts/genesis/creator-fees.md @@ -34,7 +34,7 @@ programmingLanguage: - Bash proficiencyLevel: Intermediate created: '04-09-2026' -updated: '04-24-2026' +updated: '09-25-2026' howToSteps: - 调用 createAndRegisterLaunch 时在启动对象中设置 creatorFeeWallet - 启动后使用 fetchBondingCurveBucketV2 监控桶账户中的 creatorFeeAccrued @@ -120,7 +120,7 @@ faqs: 您需要 Genesis SDK、已配置的 Umi 实例和已充值的 Solana 钱包。 -- 已安装 `@metaplex-foundation/genesis` SDK +- 已安装 `@metaplex-foundation/genesis` SDK 0.43.0 或更高版本(更早的版本缺少 `collectRaydiumCpmmFeesWithCreatorFeeV2` 所需的 `creatorFeeShare` 账户) - 配置了密钥对身份的 Umi 实例——详见[通过 Metaplex API 发行联合曲线](/smart-contracts/genesis/bonding-curve-launch#umi-setup) - 用于支付交易费用的已充值 Solana 钱包 @@ -322,6 +322,7 @@ await collectRaydiumCpmmFeesWithCreatorFeeV2(umi, { baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, }).sendAndConfirm(umi); console.log('Raydium LP fees collected into Genesis bucket'); @@ -417,6 +418,7 @@ await transactionBuilder() baseVault: pdas.baseVault, quoteVault: pdas.quoteVault, raydiumProgram: pdas.raydiumProgram, + creatorFeeShare: pdas.creatorFeeShare, })) .add(claimRaydiumCreatorFeeV2(umi, { genesisAccount, @@ -432,12 +434,13 @@ console.log('Raydium creator fees collected and claimed to:', creatorFeeWallet.t ## 注意事项 -以下注意事项涵盖费用时机、推荐的 API 认领路径、无需许可的链上认领、两步毕业后流程以及首次购买费用豁免。 +以下注意事项涵盖费用时机、推荐的 API 认领路径、无需许可的链上认领、两步毕业后流程、必需的 `creatorFeeShare` 账户以及首次购买费用豁免。 - 创作者费在每次兑换时累积到 bucket(`creatorFeeAccrued`),不会立即转账——需通过 API/SDK 或链上指令显式认领;`creatorFeeClaimed` 追踪迄今累积认领的总额 - `claimCreatorRewards`(API/SDK)将钱包有资格获得的所有联合曲线和 Raydium bucket 聚合到一次调用中;当没有可认领内容时,返回 HTTP `400` 和 `"No rewards available to claim"`,而不是空的交易数组 - 链上认领指令(`claimBondingCurveCreatorFeeV2`、`collectRaydiumCpmmFeesWithCreatorFeeV2`、`claimRaydiumCreatorFeeV2`)均无需许可:任何钱包都可以触发,但 SOL 始终流向配置的创作者费钱包,而非调用方 - 毕业后费用需要按顺序两个步骤:`collectRaydiumCpmmFeesWithCreatorFeeV2`(从 Raydium 池收集 → Genesis bucket),然后 `claimRaydiumCreatorFeeV2`(bucket → 创作者钱包);两者可合并到单个交易中,API 路径也会替您封装这两步 +- `collectRaydiumCpmmFeesWithCreatorFeeV2` 需要 `creatorFeeShare` 账户(Genesis Raydium 签名者与池 AMM 配置对应的 Raydium `CreatorFeeShare` PDA),但该账户无需在链上存在;请传入与 `ammConfig` 来自同一次 `deriveRaydiumPDAsV2` 调用的 `pdas.creatorFeeShare`——不匹配的账户会以 `InvalidRaydiumCreatorFeeShare`(错误 260)失败,0.43.0 之前的 SDK 版本会以 `NotEnoughAccountKeys` 失败 - `creatorFeeAccrued` 和 `creatorFeeClaimed` 同时存在于 `BondingCurveBucketV2`(活跃曲线)和 `RaydiumCpmmBucketV2`(毕业后)上;分别使用 `fetchBondingCurveBucketV2` 和 `fetchRaydiumCpmmBucketV2` - `creatorFeeWallet` 未设置时默认为发行钱包;曲线创建后无法更改 - 首次购买机制仅对指定的初始购买豁免所有费用(协议费和创作者费);之后所有兑换正常收取创作者费