Struct switchboard_aggregator::CpiStateContext [−][src]
pub struct CpiStateContext<'a, 'b, 'c, 'info, T> where
T: Accounts<'info>, { /* fields omitted */ }
👎 Deprecated
Expand description
Context specifying non-argument inputs for cross-program-invocations targeted at program state instructions.
Implementations
pub fn new(
program: AccountInfo<'info>,
state: AccountInfo<'info>,
accounts: T
) -> CpiStateContext<'a, 'b, 'c, 'info, T>
pub fn new_with_signer(
program: AccountInfo<'info>,
state: AccountInfo<'info>,
accounts: T,
signer_seeds: &'a [&'b [&'c [u8]]]
) -> CpiStateContext<'a, 'b, 'c, 'info, T>
pub fn with_signer(
self,
signer_seeds: &'a [&'b [&'c [u8]]]
) -> CpiStateContext<'a, 'b, 'c, 'info, T>
Trait Implementations
impl<'a, 'b, 'c, 'info, T> ToAccountInfos<'info> for CpiStateContext<'a, 'b, 'c, 'info, T> where
T: Accounts<'info>,
impl<'a, 'b, 'c, 'info, T> ToAccountInfos<'info> for CpiStateContext<'a, 'b, 'c, 'info, T> where
T: Accounts<'info>,
impl<'a, 'b, 'c, 'info, T> ToAccountMetas for CpiStateContext<'a, 'b, 'c, 'info, T> where
T: Accounts<'info>,
impl<'a, 'b, 'c, 'info, T> ToAccountMetas for CpiStateContext<'a, 'b, 'c, 'info, T> where
T: Accounts<'info>,
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