diff --git a/Cargo.toml b/Cargo.toml index ad0c793..a98ec50 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sol-trade-sdk" -version = "0.4.6" +version = "0.4.7" edition = "2021" authors = ["William ", "sgxiang ", "wei <1415121722@qq.com>"] repository = "https://github.com/0xfnzero/sol-trade-sdk" diff --git a/README.md b/README.md index c9de2ec..0ab1d38 100755 --- a/README.md +++ b/README.md @@ -33,14 +33,14 @@ Add the dependency to your `Cargo.toml`: ```toml # Add to your Cargo.toml -sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.4.6" } +sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.4.7" } ``` ### Use crates.io ```toml # Add to your Cargo.toml -sol-trade-sdk = "0.4.6" +sol-trade-sdk = "0.4.7" ``` ## Usage Examples diff --git a/README_CN.md b/README_CN.md index 1a9a8b7..061be43 100755 --- a/README_CN.md +++ b/README_CN.md @@ -33,14 +33,14 @@ git clone https://github.com/0xfnzero/sol-trade-sdk ```toml # 添加到您的 Cargo.toml -sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.4.6" } +sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.4.7" } ``` ### 使用 crates.io ```toml # 添加到您的 Cargo.toml -sol-trade-sdk = "0.4.6" +sol-trade-sdk = "0.4.7" ``` ## 使用示例 diff --git a/src/trading/core/params.rs b/src/trading/core/params.rs index c2a9489..4c4ac29 100755 --- a/src/trading/core/params.rs +++ b/src/trading/core/params.rs @@ -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 {