gmsol_callback/
interface.rs

1use anchor_lang::{prelude::Pubkey, pubkey, Ids};
2
3pub use crate::{
4    cpi::{accounts::OnCallback, on_closed, on_created, on_executed},
5    types::ActionKind,
6    CALLBACK_AUTHORITY_SEED,
7};
8
9#[cfg(not(feature = "no-competition"))]
10const COMPETITION_ID: Pubkey = pubkey!("2AxuNr6euZPKQbTwNsLBjzFTZFAevA85F4PW9m9Dv8pc");
11
12/// Callback interface for GMX-Solana.
13#[derive(Debug, Clone, Copy, Default)]
14pub struct CallbackInterface;
15
16impl Ids for CallbackInterface {
17    fn ids() -> &'static [Pubkey] {
18        static IDS: &[Pubkey] = &[
19            #[cfg(feature = "test-only")]
20            crate::ID,
21            #[cfg(not(feature = "no-competition"))]
22            COMPETITION_ID,
23        ];
24
25        IDS
26    }
27}