Struct mango_v4::accounts_ix::OpenbookV2SettleFunds
source · pub struct OpenbookV2SettleFunds<'info> {Show 18 fields
pub group: AccountLoader<'info, Group>,
pub account: AccountLoader<'info, MangoAccountFixed>,
pub authority: Signer<'info>,
pub open_orders: AccountLoader<'info, OpenOrdersAccount>,
pub openbook_v2_market: AccountLoader<'info, OpenbookV2Market>,
pub openbook_v2_program: Program<'info, OpenbookV2>,
pub openbook_v2_market_external: AccountLoader<'info, Market>,
pub market_base_vault: Box<Account<'info, TokenAccount>>,
pub market_quote_vault: Box<Account<'info, TokenAccount>>,
pub market_vault_signer: UncheckedAccount<'info>,
pub quote_bank: AccountLoader<'info, Bank>,
pub quote_vault: Box<Account<'info, TokenAccount>>,
pub base_bank: AccountLoader<'info, Bank>,
pub base_vault: Box<Account<'info, TokenAccount>>,
pub quote_oracle: UncheckedAccount<'info>,
pub base_oracle: UncheckedAccount<'info>,
pub token_program: Program<'info, Token>,
pub system_program: Program<'info, System>,
}
Fields§
§group: AccountLoader<'info, Group>
§account: AccountLoader<'info, MangoAccountFixed>
§open_orders: AccountLoader<'info, OpenOrdersAccount>
§openbook_v2_market: AccountLoader<'info, OpenbookV2Market>
§openbook_v2_program: Program<'info, OpenbookV2>
§openbook_v2_market_external: AccountLoader<'info, Market>
§market_base_vault: Box<Account<'info, TokenAccount>>
§market_quote_vault: Box<Account<'info, TokenAccount>>
§market_vault_signer: UncheckedAccount<'info>
needed for the automatic settle_funds call CHECK: Validated by the openbook_v2 cpi call
quote_bank: AccountLoader<'info, Bank>
§quote_vault: Box<Account<'info, TokenAccount>>
§base_bank: AccountLoader<'info, Bank>
§base_vault: Box<Account<'info, TokenAccount>>
§quote_oracle: UncheckedAccount<'info>
CHECK: validated against banks at #4
base_oracle: UncheckedAccount<'info>
CHECK: validated against banks at #4
token_program: Program<'info, Token>
§system_program: Program<'info, System>
Trait Implementations§
source§impl<'info> Accounts<'info> for OpenbookV2SettleFunds<'info>where
'info: 'info,
impl<'info> Accounts<'info> for OpenbookV2SettleFunds<'info>where 'info: 'info,
source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &[AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut BTreeMap<String, u8>,
__reallocs: &mut BTreeSet<Pubkey>
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &[AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut BTreeMap<String, u8>, __reallocs: &mut BTreeSet<Pubkey> ) -> Result<Self>
Returns the validated accounts struct. What constitutes “valid” is
program dependent. However, users of these types should never have to
worry about account substitution attacks. For example, if a program
expects a
Mint
account from the SPL token program in a particular
field, then it should be impossible for this method to return Ok
if
any other account type is given–from the SPL token program or elsewhere. Read moresource§impl<'info> AccountsExit<'info> for OpenbookV2SettleFunds<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for OpenbookV2SettleFunds<'info>where 'info: 'info,
source§impl<'info> ToAccountInfos<'info> for OpenbookV2SettleFunds<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for OpenbookV2SettleFunds<'info>where 'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
source§impl<'info> ToAccountMetas for OpenbookV2SettleFunds<'info>
impl<'info> ToAccountMetas for OpenbookV2SettleFunds<'info>
source§fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
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.Auto Trait Implementations§
impl<'info> !RefUnwindSafe for OpenbookV2SettleFunds<'info>
impl<'info> !Send for OpenbookV2SettleFunds<'info>
impl<'info> !Sync for OpenbookV2SettleFunds<'info>
impl<'info> Unpin for OpenbookV2SettleFunds<'info>
impl<'info> !UnwindSafe for OpenbookV2SettleFunds<'info>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.