Skip to main content

typhoon_context/
remaining_accounts.rs

1use {
2    crate::HandlerContext, solana_account_view::AccountView, solana_address::Address,
3    typhoon_errors::Error,
4};
5
6pub struct Remaining<'a>(pub &'a [AccountView]);
7
8impl<'b> HandlerContext<'_, 'b, '_> for Remaining<'b> {
9    #[inline(always)]
10    fn from_entrypoint(
11        _program_id: &Address,
12        accounts: &mut &'b [AccountView],
13        _instruction_data: &mut &[u8],
14    ) -> Result<Self, Error> {
15        Ok(Remaining(accounts))
16    }
17}