feat: add seed optimization and mint ATA creation control

- Add open_seed_optimize parameter for transaction CU optimization using createAccountWithSeed
- Add create_mint_ata parameter to control automatic mint token account creation
- Update all examples to include new create_mint_ata parameter (set to true)
- Enhance documentation with detailed explanations of seed optimization features
- Add warnings about compatibility requirements when using seed optimization
- Support conditional mint ATA creation across all trading protocols (PumpFun, PumpSwap, Bonk, Raydium)

BREAKING CHANGE: All buy functions now require create_mint_ata parameter
This commit is contained in:
ysq
2025-09-10 00:18:31 +08:00
parent 5225cff73c
commit 30c41efece
22 changed files with 102 additions and 54 deletions
+1
View File
@@ -171,6 +171,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
true,
false,
false,
true,
false,
)
.await?;
+1
View File
@@ -153,6 +153,7 @@ async fn bonk_copy_trade_with_grpc(trade_info: BonkTradeEvent) -> AnyResult<()>
true,
true,
true,
true,
false,
)
.await?;
+1
View File
@@ -122,6 +122,7 @@ async fn bonk_sniper_trade_with_shreds(trade_info: BonkTradeEvent) -> AnyResult<
true,
true,
true,
true,
false,
)
.await?;
+1
View File
@@ -104,6 +104,7 @@ async fn test_middleware() -> AnyResult<()> {
true,
true,
true,
true,
false,
)
.await?;
+1
View File
@@ -154,6 +154,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
true,
false,
false,
true,
false,
)
.await?;
@@ -147,6 +147,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
true,
false,
false,
true,
false,
)
.await?;
@@ -115,6 +115,7 @@ async fn pumpfun_sniper_trade_with_shreds(trade_info: PumpFunTradeEvent) -> AnyR
true,
true,
true,
true,
false,
)
.await?;
@@ -35,6 +35,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
true,
true,
true,
true,
false,
)
.await?;
+1
View File
@@ -189,6 +189,7 @@ async fn pumpswap_trade_with_grpc(mint_pubkey: Pubkey, params: PumpSwapParams) -
true,
true,
true,
true,
false,
)
.await?;
@@ -160,6 +160,7 @@ async fn raydium_amm_v4_copy_trade_with_grpc(trade_info: RaydiumAmmV4SwapEvent)
true,
true,
true,
true,
false,
)
.await?;
@@ -164,6 +164,7 @@ async fn raydium_cpmm_copy_trade_with_grpc(trade_info: RaydiumCpmmSwapEvent) ->
true,
true,
true,
true,
false,
)
.await?;
+1
View File
@@ -37,6 +37,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
true,
true,
true,
true,
true, // ❗️❗️❗️❗️ open seed optimize
)
.await?;