percli_program/instructions/
events.rs1use anchor_lang::prelude::*;
2
3#[event]
4pub struct MarketInitialized {
5 pub authority: Pubkey,
6 pub mint: Pubkey,
7 pub oracle: Pubkey,
8 pub matcher: Pubkey,
9 pub init_slot: u64,
10 pub init_oracle_price: u64,
11}
12
13#[event]
14pub struct Deposited {
15 pub user: Pubkey,
16 pub account_idx: u16,
17 pub amount: u64,
18}
19
20#[event]
21pub struct Withdrawn {
22 pub user: Pubkey,
23 pub account_idx: u16,
24 pub amount: u64,
25}
26
27#[event]
28pub struct TradeExecuted {
29 pub matcher: Pubkey,
30 pub account_a: u16,
31 pub account_b: u16,
32 pub size_q: i128,
33 pub exec_price: u64,
34}
35
36#[event]
37pub struct Cranked {
38 pub cranker: Pubkey,
39 pub oracle_price: u64,
40 pub slot: u64,
41}
42
43#[event]
44pub struct Liquidated {
45 pub liquidator: Pubkey,
46 pub account_idx: u16,
47 pub liquidated: bool,
48}
49
50#[event]
51pub struct Settled {
52 pub user: Pubkey,
53 pub account_idx: u16,
54}
55
56#[event]
57pub struct AccountClosed {
58 pub user: Pubkey,
59 pub account_idx: u16,
60}
61
62#[event]
63pub struct AccountReclaimed {
64 pub reclaimer: Pubkey,
65 pub account_idx: u16,
66}
67
68#[event]
69pub struct InsuranceWithdrawn {
70 pub authority: Pubkey,
71 pub amount: u64,
72}