Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 76f0523

Browse files
Add pausable proposal (#1506)
* feat: add pausable proposal * fix: update proposal
1 parent 3858d0a commit 76f0523

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

token-swap/proposals/Pausable.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Pausable & Ownable
2+
3+
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.
4+
5+
An Owner program with the instructions you've listed:
6+
7+
- set owner
8+
- renounce ownership
9+
- check owner
10+
11+
Additionally:
12+
* an Owner struct should contain Option<Pubkey>
13+
* library code should generate a pda, probably given (struct_key, program_id)
14+
15+
Given an Owner program, compose it with the Pause program.
16+
17+
- pause
18+
- resume
19+
20+
Note: only owner can pause/resume normal operations
21+
22+
For both programs provide example usage from other programs via CPI and unit tests.
23+
24+
Links:
25+
* [Pausable solidity contract](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/24a0bc23cfe3fbc76f8f2510b78af1e948ae6651/contracts/security/Pausable.sol)
26+
* [Ownable solidity contract](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/24a0bc23cfe3fbc76f8f2510b78af1e948ae6651/contracts/access/Ownable.sol)

0 commit comments

Comments
 (0)