1#![deny(unaligned_references)]
2#![allow(clippy::try_err)]
3
4#[macro_use]
5pub mod error;
6
7#[cfg(test)]
8mod tests;
9
10pub mod critbit;
11mod fees;
12pub mod instruction;
13pub mod matching;
14pub mod state;
15
16#[cfg(all(feature = "program", not(feature = "no-entrypoint")))]
17use solana_program::entrypoint;
18#[cfg(feature = "program")]
19use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey};
20
21#[cfg(feature = "program")]
22#[cfg(not(feature = "no-entrypoint"))]
23entrypoint!(process_instruction);
24#[cfg(feature = "program")]
25fn process_instruction(
26 program_id: &Pubkey,
27 accounts: &[AccountInfo],
28 instruction_data: &[u8],
29) -> ProgramResult {
30 Ok(state::State::process(
31 program_id,
32 accounts,
33 instruction_data,
34 )?)
35}