Propagate PumpFun instruction amount fields

This commit is contained in:
0xfnzero
2026-05-17 21:32:48 +08:00
parent c0883dfc7b
commit b60838a840
5 changed files with 26 additions and 17 deletions
+6
View File
@@ -62,6 +62,9 @@ mod tests {
t.user = Pubkey::new_unique();
t.sol_amount = 100;
t.token_amount = 200;
t.amount = 200;
t.max_sol_cost = 150;
t.min_sol_output = 0;
t.is_buy = true;
let ev = convert_parser_event(PbDexEvent::PumpFunTrade(t), None, 999).expect("convert");
@@ -71,6 +74,9 @@ mod tests {
assert_eq!(st.metadata.recv_us, 999);
assert_eq!(st.sol_amount, 100);
assert_eq!(st.token_amount, 200);
assert_eq!(st.amount, 200);
assert_eq!(st.max_sol_cost, 150);
assert_eq!(st.min_sol_output, 0);
assert!(st.is_buy);
}
_ => panic!("expected PumpFunTradeEvent"),