This repository was archived by the owner on Mar 11, 2025. It is now read-only.
Commit 612a301
authored
token-2022: Add Pausable extension (#7562)
* token-2022: Add Pausable extension
#### Problem
Users want a more Ethereum-style token experience by being able to
"pause" their token, similar to the "Pausable" interface. When a mint is
paused, tokens cannot be minted, burned, or transferred.
#### Summary of changes
Add the extension and some tests. It covers the following interactions:
* mint / mint-checked
* burn / burn-checked
* transfer / transfer-checked / transfer-with-fee
* confidential transfer / confidential transfer with fee
* confidential mint / confidential burn
Unfortunately, the confidential mint / burn extension doesn't have
testing, so I couldn't get a full end-to-end test for it.
Also note that it's still possible to:
* move withheld tokens
* initialize token accounts
* close token accounts
* set authority
* freeze / thaw
* approve / revoke
* almost every other bit of extension management
* Fix comments and semicolon
* Add tests for deposit and withdraw1 parent f634a9b commit 612a301
File tree
14 files changed
+1128
-4
lines changed- token
- client/src
- program-2022-test/tests
- program-2022/src
- extension
- confidential_mint_burn
- confidential_transfer
- pausable
14 files changed
+1128
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| |||
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
1753 | 1760 | | |
1754 | 1761 | | |
1755 | 1762 | | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
1756 | 1805 | | |
1757 | 1806 | | |
1758 | 1807 | | |
| |||
0 commit comments