feat: add Raydium CLMM protocol support, bump version to 0.2.1
This commit is contained in:
+4
-2
@@ -353,8 +353,9 @@ async fn test_raydium_cpmm() -> Result<(), Box<dyn std::error::Error>> {
|
||||
recent_blockhash,
|
||||
None,
|
||||
Some(Box::new(RaydiumCpmmParams {
|
||||
pool_state: Some(pool_state), // 如果不传,会自动计算 wsol-mint 方向的池子
|
||||
pool_state: Some(pool_state), // 如果不传,会自动计算
|
||||
mint_token_program: Some(spl_token::ID), // spl_token_2022::ID
|
||||
mint_token_in_pool_state_index: Some(1), // mint_token 在 pool_state 中的索引,默认在索引1
|
||||
minimum_amount_out: Some(buy_amount_out), // 如果不传、默认为0
|
||||
auto_handle_wsol: true,
|
||||
})),
|
||||
@@ -373,8 +374,9 @@ async fn test_raydium_cpmm() -> Result<(), Box<dyn std::error::Error>> {
|
||||
recent_blockhash,
|
||||
None,
|
||||
Some(Box::new(RaydiumCpmmParams {
|
||||
pool_state: Some(pool_state), // 如果不传,会自动计算 wsol-mint 方向的池子
|
||||
pool_state: Some(pool_state), // 如果不传,会自动计算
|
||||
mint_token_program: Some(spl_token::ID), // spl_token_2022::ID
|
||||
mint_token_in_pool_state_index: Some(1), // mint_token 在 pool_state 中的索引,默认在索引1
|
||||
minimum_amount_out: Some(sell_sol_amount), // 如果不传、默认为0
|
||||
auto_handle_wsol: true,
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user