Function close_glv_deposit

Source
pub fn close_glv_deposit<'info>(
    ctx: Context<'_, '_, 'info, 'info, CloseGlvDeposit<'info>>,
    reason: String,
) -> Result<()>
Expand description

Close GLV deposit.

§Accounts

See the documentation for the accounts.

§Arguments

  • reason: The reason for closing the GLV deposit.

§Errors

  • The executor must be a signer, and must be either the owner of the GLV deposit or a ORDER_KEEPER in the store
  • The store must be properly initialized
  • The owner must be the owner of the GLV deposit
  • The glv_deposit must be:
    • Properly initialized
    • Owned by the owner and store
    • In cancelled or executed state if the executor is not the owner
  • Token mint account requirements:
  • Escrow account requirements:
    • Must correspond to their respective tokens
    • Must be owned by the glv_deposit
    • Must be recorded in the glv_deposit
  • The addresses of the ATAs must be valid associated token addresses derived from the respective tokens and owner
  • All token programs must match their corresponding token accounts