struct PairInfo has key {
pair_list: vector<PairMeta>,
}
struct Events<phantom X, phantom Y> has key {
pair_created_event: event::EventHandle<PairCreatedEvent<X, Y>>,
mint_event: event::EventHandle<MintEvent<X, Y>>,
burn_event: event::EventHandle<BurnEvent<X, Y>>,
swap_event: event::EventHandle<SwapEvent<X, Y>>,
sync_event: event::EventHandle<SyncEvent<X, Y>>,
flash_swap_event: event::EventHandle<FlashSwapEvent<X, Y>>,
}
struct PairCreatedEvent<phantom X, phantom Y> has drop, store {
meta: PairMeta,
}
struct MintEvent<phantom X, phantom Y> has drop, store {
amount_x: u64,
amount_y: u64,
liquidity: u64,
}
struct BurnEvent<phantom X, phantom Y> has drop, store {
amount_x: u64,
amount_y: u64,
liquidity: u64,
}
struct SwapEvent<phantom X, phantom Y> has drop, store {
amount_x_in: u64,
amount_y_in: u64,
amount_x_out: u64,
amount_y_out: u64,
}
struct SyncEvent<phantom X, phantom Y> has drop, store {
reserve_x: u64,
reserve_y: u64,
last_price_x_cumulative: u128,
last_price_y_cumulative: u128,
}
struct FlashSwapEvent<phantom X, phantom Y> has drop, store {
loan_coin_x: u64,
loan_coin_y: u64,
repay_coin_x: u64,
repay_coin_y: u64,
}