Skip to content

Commit 1684c57

Browse files
ernestognwfrangio
andauthored
Add ERC*Pausable warning for public pausing mechanism (OpenZeppelin#4007)
Co-authored-by: Francisco <fg@frang.io>
1 parent bc6de21 commit 1684c57

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

.changeset/new-ways-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': patch
3+
---
4+
5+
`ERC20Pausable`, `ERC721Pausable`, `ERC1155Pausable`: Add note regarding missing public pausing functionality

contracts/token/ERC1155/extensions/ERC1155Pausable.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ import "../../../security/Pausable.sol";
1313
* period, or having an emergency switch for freezing all token transfers in the
1414
* event of a large bug.
1515
*
16+
* IMPORTANT: This contract does not include public pause and unpause functions. In
17+
* addition to inheriting this contract, you must define both functions, invoking the
18+
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
19+
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
20+
* make the contract unpausable.
21+
*
1622
* _Available since v3.1._
1723
*/
1824
abstract contract ERC1155Pausable is ERC1155, Pausable {

contracts/token/ERC20/extensions/ERC20Pausable.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import "../../../security/Pausable.sol";
1212
* Useful for scenarios such as preventing trades until the end of an evaluation
1313
* period, or having an emergency switch for freezing all token transfers in the
1414
* event of a large bug.
15+
*
16+
* IMPORTANT: This contract does not include public pause and unpause functions. In
17+
* addition to inheriting this contract, you must define both functions, invoking the
18+
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
19+
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
20+
* make the contract unpausable.
1521
*/
1622
abstract contract ERC20Pausable is ERC20, Pausable {
1723
/**

contracts/token/ERC721/extensions/ERC721Pausable.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ import "../../../security/Pausable.sol";
1212
* Useful for scenarios such as preventing trades until the end of an evaluation
1313
* period, or having an emergency switch for freezing all token transfers in the
1414
* event of a large bug.
15+
*
16+
* IMPORTANT: This contract does not include public pause and unpause functions. In
17+
* addition to inheriting this contract, you must define both functions, invoking the
18+
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
19+
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
20+
* make the contract unpausable.
1521
*/
1622
abstract contract ERC721Pausable is ERC721, Pausable {
1723
/**

0 commit comments

Comments
 (0)