oil_api/state/
auction_pool.rs1use serde::{Deserialize, Serialize};
2use steel::*;
3
4use crate::state::auction_pool_pda;
5use super::OilAccount;
6
7#[repr(C)]
11#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable, Serialize, Deserialize)]
12pub struct AuctionPool {
13 pub well_id: u64,
15
16 pub epoch_id: u64,
18
19 pub total_contributions: u64,
21
22 pub buffer_a: u64,
24
25 pub buffer_b: u64,
27
28 pub buffer_c: u64,
30}
31
32impl AuctionPool {
33 pub fn pda(well_id: u64, epoch_id: u64) -> (Pubkey, u8) {
34 auction_pool_pda(well_id, epoch_id)
35 }
36}
37
38account!(OilAccount, AuctionPool);