typhoon_context/remaining_accounts.rs
1use {
2 crate::HandlerContext,
3 pinocchio::{account_info::AccountInfo, pubkey::Pubkey},
4 typhoon_errors::Error,
5};
6
7pub struct Remaining<'a>(pub &'a [AccountInfo]);
8
9impl<'b> HandlerContext<'_, 'b, '_> for Remaining<'b> {
10 #[inline(always)]
11 fn from_entrypoint(
12 _program_id: &Pubkey,
13 accounts: &mut &'b [AccountInfo],
14 _instruction_data: &mut &[u8],
15 ) -> Result<Self, Error> {
16 Ok(Remaining(accounts))
17 }
18}