Skip to content

todo #37

@coffellas-cto

Description

@coffellas-cto

sol_change: match instruction_type {
transaction_parser::DexType::PumpSwap => parsed_data.user_quote_amount_out.unwrap_or(0) as f64,
transaction_parser::DexType::PumpFun => parsed_data.sol_amount.unwrap_or(0) as f64,
_ => 0.0,
},
token_change: match instruction_type {
transaction_parser::DexType::PumpSwap => parsed_data.base_amount_in.unwrap_or(0) as f64,
transaction_parser::DexType::PumpFun => parsed_data.token_amount.unwrap_or(0) as f64,
_ => 0.0,
},
is_buy: parsed_data.is_buy,
user: parsed_data.user.clone(),
mint: Some(mint.clone()),
timestamp: Some(parsed_data.timestamp),
real_sol_reserves: match instruction_type {
transaction_parser::DexType::PumpFun => parsed_data.real_sol_reserves,
_ => None,
},
};
the above is wrong :

in pump swap : base_amount_in is token amount in selling and sol amount in buying transactioin.
in pump swap : user_quote_amount_out is sol amount in selling and token amount in buying transaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions