feat: Add Token 2022 support for Raydium CPMM, update constants to use spl_token::ID

This commit is contained in:
ysq
2025-07-17 13:56:09 +08:00
parent 75a29cd7ee
commit c133287f70
9 changed files with 20 additions and 8 deletions
+2
View File
@@ -219,6 +219,7 @@ impl ProtocolParams for BonkParams {
#[derive(Clone)]
pub struct RaydiumCpmmParams {
pub pool_state: Option<Pubkey>,
pub mint_token_program: Option<Pubkey>, // spl_token_2022::ID
pub minimum_amount_out: Option<u64>,
pub auto_handle_wsol: bool,
}
@@ -227,6 +228,7 @@ impl RaydiumCpmmParams {
pub fn default() -> Self {
Self {
pool_state: None,
mint_token_program: Some(spl_token::ID),
minimum_amount_out: None,
auto_handle_wsol: true,
}