Struct switchboard_aggregator::CpiContext [−][src]
pub struct CpiContext<'a, 'b, 'c, 'info, T> where
T: ToAccountMetas + ToAccountInfos<'info>, {
pub accounts: T,
pub remaining_accounts: Vec<AccountInfo<'info>, Global>,
pub program: AccountInfo<'info>,
pub signer_seeds: &'a [&'b [&'c [u8]]],
}
Expand description
Context specifying non-argument inputs for cross-program-invocations.
Fields
accounts: T
remaining_accounts: Vec<AccountInfo<'info>, Global>
program: AccountInfo<'info>
signer_seeds: &'a [&'b [&'c [u8]]]
Implementations
impl<'a, 'b, 'c, 'info, T> CpiContext<'a, 'b, 'c, 'info, T> where
T: ToAccountMetas + ToAccountInfos<'info>,
impl<'a, 'b, 'c, 'info, T> CpiContext<'a, 'b, 'c, 'info, T> where
T: ToAccountMetas + ToAccountInfos<'info>,
pub fn new_with_signer(
program: AccountInfo<'info>,
accounts: T,
signer_seeds: &'a [&'b [&'c [u8]]]
) -> CpiContext<'a, 'b, 'c, 'info, T>
pub fn with_signer(
self,
signer_seeds: &'a [&'b [&'c [u8]]]
) -> CpiContext<'a, 'b, 'c, 'info, T>
pub fn with_remaining_accounts(
self,
ra: Vec<AccountInfo<'info>, Global>
) -> CpiContext<'a, 'b, 'c, 'info, T>
Trait Implementations
impl<'info, '_, '_, '_, T> ToAccountInfos<'info> for CpiContext<'_, '_, '_, 'info, T> where
T: ToAccountInfos<'info> + ToAccountMetas,
impl<'info, '_, '_, '_, T> ToAccountInfos<'info> for CpiContext<'_, '_, '_, 'info, T> where
T: ToAccountInfos<'info> + ToAccountMetas,
impl<'info, '_, '_, '_, T> ToAccountMetas for CpiContext<'_, '_, '_, 'info, T> where
T: ToAccountInfos<'info> + ToAccountMetas,
impl<'info, '_, '_, '_, T> ToAccountMetas for CpiContext<'_, '_, '_, 'info, T> where
T: ToAccountInfos<'info> + ToAccountMetas,
is_signer
is given as an optional override for the signer meta field.
This covers the edge case when a program-derived-address needs to relay
a transaction from a client to another program but sign the transaction
before the relay. The client cannot mark the field as a signer, and so
we have to override the is_signer meta field given by the client. Read more