Skip to main content

Is it common to have close account instruction inside my solana program

In my Solana program, users can create program-owned accounts.

Although maybe they want to close it because it is no longer necessary and want to recoup the account rent/fees.

  1. I assume that closing program accounts can only occur from within the program itself, which requires making a dedicated program instruction. Is this common?

  2. If I close the entire Solana program, will all the program-owned accounts also be closed at the same time? If so who will receive all the account fees, and the upgrade auth?

Burger Bob
  • 1.5k
  • 4
  • 19