994 B
994 B
Pausable & Ownable
Implement two programs for SPL that can be used to extend contracts with ability to pause, resume and check for the owner before instructions are executed.
An Owner program with the instructions you've listed:
- set owner
- renounce ownership
- check owner
Additionally:
- an Owner struct should contain Option
- library code should generate a pda, probably given (struct_key, program_id)
Given an Owner program, compose it with the Pause program.
- pause
- resume
Note: only owner can pause/resume normal operations
For both programs provide example usage from other programs via CPI and unit tests.
Links: