feat(core): Upgrade SDK version to 0.4.7 and enhance parameter constructors

- Upgrade SDK version from 0.4.6 to 0.4.7
- Enhance PumpFunParams.immediate_sell function with creator parameter support
- Extend BonkParams.immediate_sell function with necessary platform parameters
This commit is contained in:
ysq
2025-08-22 22:28:54 +08:00
parent 1f47fc84d4
commit 20767ae597
4 changed files with 21 additions and 9 deletions
+16 -4
View File
@@ -107,9 +107,9 @@ pub struct PumpFunParams {
}
impl PumpFunParams {
pub fn immediate_sell(close_token_account_when_sell: bool) -> Self {
pub fn immediate_sell(creator: Pubkey, close_token_account_when_sell: bool) -> Self {
Self {
bonding_curve: Arc::new(BondingCurveAccount { ..Default::default() }),
bonding_curve: Arc::new(BondingCurveAccount { creator, ..Default::default() }),
close_token_account_when_sell: Some(close_token_account_when_sell),
}
}
@@ -247,8 +247,20 @@ pub struct BonkParams {
}
impl BonkParams {
pub fn immediate_sell() -> Self {
Self { auto_handle_wsol: true, ..Default::default() }
pub fn immediate_sell(
mint_token_program: Pubkey,
platform_onfig: Pubkey,
platform_associated_account: Pubkey,
creator_associated_account: Pubkey,
) -> Self {
Self {
auto_handle_wsol: true,
mint_token_program,
platform_onfig,
platform_associated_account,
creator_associated_account,
..Default::default()
}
}
pub fn from_trade(trade_info: BonkTradeEvent) -> Self {
Self {