3

i want to close all the tree accounts i created with the Solana compression program to claim the sol used for creating them how do i go about it since it's not like the normal spl token programme

1 Answer 1

2

If you happened to have initialized the tree accounts without going through the Metaplex Bubblegum program, you should be able to use the createCloseEmptyTreeInstruction helper function from @solana/spl-account-compression to close a tree account.

Note that this would only be possible for an "empty" tree where all the leaves are "0".

However, if you initialized the tree accounts through the Metaplex Bubblegum program, it doesn't seem like there's currently an instruction to close the tree account. This is because the tree authority is set as a PDA derived from the Bubblegum program and you wouldn't be able to sign for the instruction to close the tree account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.