feat(pumpfun): runtime V2 flag, buyback fee pool fix, legacy ix encoding
- Replace compile-time `pumpfun-v2` feature flag with runtime `TradeConfig::use_pumpfun_v2(bool)` for flexible V1/V2 switching - Fix BUYBACK_FEE_RECIPIENTS pool: replace wrong addresses (was reusing standard pool + FEE_CONFIG) with official buyback pool from FEE_RECIPIENTS.md - Fix legacy buy/buy_exact_sol_in ix data encoding: use 2-byte Option<bool> (option tag + value) matching official Pump SDK, 26 bytes total instead of broken 25 - Add `SwapParams.use_pumpfun_v2` field and wire through TradingClient buy/sell paths - V2 instructions read `quote_mint` from `PumpFunParams` (not BondingCurveAccount which lacks the field) - Fix `fetch_bonding_curve_account` to use BorshDeserialize instead of non-existent `decode_from_chain_account_data` - Update all examples with `use_pumpfun_v2: false` field - Update README with unified V1/V2 section showing both enabling methods
This commit is contained in:
@@ -172,6 +172,7 @@ async fn pumpfun_copy_trade_with_grpc(
|
||||
gas_fee_strategy: gas_fee_strategy.clone(),
|
||||
simulate: false,
|
||||
use_exact_sol_amount: None,
|
||||
use_pumpfun_v2: false,
|
||||
grpc_recv_us: None,
|
||||
};
|
||||
client.buy(buy_params).await?;
|
||||
|
||||
Reference in New Issue
Block a user