Skip to content

Commit

Permalink
Add ERC*Pausable warning for public pausing mechanism (#4007)
Browse files Browse the repository at this point in the history
Co-authored-by: Francisco <fg@frang.io>
  • Loading branch information
ernestognw and frangio authored Jan 28, 2023
1 parent bc6de21 commit 1684c57
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-ways-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': patch
---

`ERC20Pausable`, `ERC721Pausable`, `ERC1155Pausable`: Add note regarding missing public pausing functionality
6 changes: 6 additions & 0 deletions contracts/token/ERC1155/extensions/ERC1155Pausable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ import "../../../security/Pausable.sol";
* period, or having an emergency switch for freezing all token transfers in the
* event of a large bug.
*
* IMPORTANT: This contract does not include public pause and unpause functions. In
* addition to inheriting this contract, you must define both functions, invoking the
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
* make the contract unpausable.
*
* _Available since v3.1._
*/
abstract contract ERC1155Pausable is ERC1155, Pausable {
Expand Down
6 changes: 6 additions & 0 deletions contracts/token/ERC20/extensions/ERC20Pausable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import "../../../security/Pausable.sol";
* Useful for scenarios such as preventing trades until the end of an evaluation
* period, or having an emergency switch for freezing all token transfers in the
* event of a large bug.
*
* IMPORTANT: This contract does not include public pause and unpause functions. In
* addition to inheriting this contract, you must define both functions, invoking the
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
* make the contract unpausable.
*/
abstract contract ERC20Pausable is ERC20, Pausable {
/**
Expand Down
6 changes: 6 additions & 0 deletions contracts/token/ERC721/extensions/ERC721Pausable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import "../../../security/Pausable.sol";
* Useful for scenarios such as preventing trades until the end of an evaluation
* period, or having an emergency switch for freezing all token transfers in the
* event of a large bug.
*
* IMPORTANT: This contract does not include public pause and unpause functions. In
* addition to inheriting this contract, you must define both functions, invoking the
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
* make the contract unpausable.
*/
abstract contract ERC721Pausable is ERC721, Pausable {
/**
Expand Down

0 comments on commit 1684c57

Please sign in to comment.