continuation_router/action/mod.rs
1use anchor_lang::prelude::*;
2use anchor_spl::token::TokenAccount;
3
4use crate::processor::ActionContext;
5
6pub mod stable_swap;
7
8pub trait ProcessAction<'info>: Sized {
9 /// Processes the action.
10 fn process(
11 ctx: &ActionContext<'_, '_, '_, 'info, Self>,
12 amount_in: u64,
13 minimum_amount_out: u64,
14 ) -> Result<()>;
15
16 fn input_account(&self) -> &Account<'info, TokenAccount>;
17
18 fn output_account(&self) -> &Account<'info, TokenAccount>;
19}