diff --git a/src/instruction/pumpfun.rs b/src/instruction/pumpfun.rs index 31b493b..6f33a75 100644 --- a/src/instruction/pumpfun.rs +++ b/src/instruction/pumpfun.rs @@ -34,7 +34,7 @@ use solana_sdk::{instruction::Instruction, pubkey::Pubkey, signer::Signer}; fn effective_pump_mint_token_program(protocol_params: &PumpFunParams) -> Pubkey { let tp = protocol_params.token_program; if tp == Pubkey::default() { - TOKEN_PROGRAM_2022 + crate::constants::TOKEN_PROGRAM // legacy SPL Token — safe default; Token-2022 must be explicit } else { tp } diff --git a/src/trading/core/params/pumpfun.rs b/src/trading/core/params/pumpfun.rs index 2d2b7bd..1212180 100644 --- a/src/trading/core/params/pumpfun.rs +++ b/src/trading/core/params/pumpfun.rs @@ -33,7 +33,7 @@ pub struct PumpFunParams { /// `Some(PDA(["creator-vault", fee_sharing_config]))` when pump-fees `SharingConfig` is **Active**; set by `from_mint_by_rpc` / [`refresh_fee_sharing_creator_vault_from_rpc`](Self::refresh_fee_sharing_creator_vault_from_rpc). pub fee_sharing_creator_vault_if_active: Option, /// SPL Token or Token-2022 program id owning the **mint** (from gRPC / parser / cache). - /// **`Pubkey::default()`**:ix 构建时使用 SDK 默认 **Token-2022**(与多数 Pump.fun 新发一致);显式传入 Legacy 或 Token-2022 id 可覆盖该默认值。 + /// **`Pubkey::default()`**:ix 构建时使用 SDK 默认 **Token Program (legacy)**;create_v2 代币需显式传入 `TOKEN_PROGRAM_2022`。 pub token_program: Pubkey, /// Whether to close token account when selling, only effective during sell operations pub close_token_account_when_sell: Option,