When I call the getAccountInfo web3 method for an account on which a CloseAccount instruction has been run, it returns null. I wanted to ask if the Geyser plugin notifies about an account update when a closed account instruction is run for it? Essentially, I want to know if an account was closed from Geyser plugin data.
2 Answers
You should see an update for the address to an account owned by the system program, with no data and a zero lamports balance
-
If you were tracking accounts by owner what would be the best way to catch these events then? And why is it that it reverts to system program owned?– liamvovkCommented Aug 17, 2023 at 1:20
-
new questions don't belong in the replies to a year old answer Commented Aug 29, 2023 at 2:14
This is merely a guess, but I would bet that:
- yes, you will receive an account update for such an account, when it is closed
- you will be able to infer that it has been closed because its new
lamports
balance is zero.
solana-test-validator
with the Geyser plugin? You could close an account there and see what message you receive.