Trait DexStrategy

Source
pub trait DexStrategy: Send + Sync {
    // Required method
    fn execute_swap<'life0, 'async_trait>(
        &'life0 self,
        params: SwapParams,
    ) -> Pin<Box<dyn Future<Output = Result<SwapResult, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait defining DEX swap functionality

Required Methods§

Source

fn execute_swap<'life0, 'async_trait>( &'life0 self, params: SwapParams, ) -> Pin<Box<dyn Future<Output = Result<SwapResult, RelayerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a token swap operation

Implementors§

Source§

impl DexStrategy for NoopDex

Source§

impl<P, S, J> DexStrategy for NetworkDex<P, S, J>
where P: SolanaProviderTrait + Send + Sync + 'static, S: SolanaSignTrait + Send + Sync + 'static, J: JupiterServiceTrait + Send + Sync + 'static,

Source§

impl<P, S, J> DexStrategy for JupiterSwapDex<P, S, J>
where P: SolanaProviderTrait + Send + Sync + 'static, S: SolanaSignTrait + Send + Sync + 'static, J: JupiterServiceTrait + Send + Sync + 'static,

Source§

impl<S, J> DexStrategy for JupiterUltraDex<S, J>
where S: SolanaSignTrait + Send + Sync + 'static, J: JupiterServiceTrait + Send + Sync + 'static,