feat(pumpswap): Auto-wrap SOL and enrich gRPC events
This commit introduces two main enhancements:
1. Adds an `auto_handle_wsol` parameter to `PumpSwap` buy/sell functions. When enabled, the SDK automatically manages the wrapping of SOL to WSOL and unwrapping back to SOL, simplifying client-side logic.
2. Enriches `PumpSwap` gRPC buy/sell events by parsing transaction instructions to include token mints and account addresses, providing more context for event consumers.
This commit is contained in:
@@ -34,6 +34,7 @@ pub async fn sell(
|
||||
pool_quote_token_account,
|
||||
user_base_token_account,
|
||||
user_quote_token_account,
|
||||
auto_handle_wsol: true,
|
||||
});
|
||||
// 创建卖出参数
|
||||
let sell_params = SellParams {
|
||||
@@ -163,6 +164,7 @@ pub async fn sell_with_tip(
|
||||
pool_quote_token_account,
|
||||
user_base_token_account,
|
||||
user_quote_token_account,
|
||||
auto_handle_wsol: true,
|
||||
});
|
||||
// 创建卖出参数
|
||||
let sell_params = SellParams {
|
||||
|
||||
Reference in New Issue
Block a user