How can I pause program in Anchor on Solana like pause provided by Solidity? I know programs on Solana is stateless, but I need to achieve this function.

1 Answer 1


As you point out, since a Solana program is stateless, you can't really pause a program on Solana. You have a couple of options to achieve something similar:

  • include some global "state" account on all instructions to your program. The global state account contains an is_paused field. During the program, if the field is set, it will abort any instruction. The is_paused field can only be set by some admin key
  • upgrade the program to a no-op program

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.