Add ERC*Pausable warning for public pausing mechanism (#4007)
Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
5
.changeset/new-ways-own.md
Normal file
5
.changeset/new-ways-own.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'openzeppelin-solidity': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
`ERC20Pausable`, `ERC721Pausable`, `ERC1155Pausable`: Add note regarding missing public pausing functionality
|
||||||
@ -13,6 +13,12 @@ import "../../../security/Pausable.sol";
|
|||||||
* period, or having an emergency switch for freezing all token transfers in the
|
* period, or having an emergency switch for freezing all token transfers in the
|
||||||
* event of a large bug.
|
* 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._
|
* _Available since v3.1._
|
||||||
*/
|
*/
|
||||||
abstract contract ERC1155Pausable is ERC1155, Pausable {
|
abstract contract ERC1155Pausable is ERC1155, Pausable {
|
||||||
|
|||||||
@ -12,6 +12,12 @@ import "../../../security/Pausable.sol";
|
|||||||
* Useful for scenarios such as preventing trades until the end of an evaluation
|
* 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
|
* period, or having an emergency switch for freezing all token transfers in the
|
||||||
* event of a large bug.
|
* 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 {
|
abstract contract ERC20Pausable is ERC20, Pausable {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,6 +12,12 @@ import "../../../security/Pausable.sol";
|
|||||||
* Useful for scenarios such as preventing trades until the end of an evaluation
|
* 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
|
* period, or having an emergency switch for freezing all token transfers in the
|
||||||
* event of a large bug.
|
* 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 {
|
abstract contract ERC721Pausable is ERC721, Pausable {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user