Skip to content

Commit cb0c144

Browse files
Transpile e541d4a
1 parent c10536c commit cb0c144

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
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/ERC1155PausableUpgradeable.sol

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

contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol

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

contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol

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

docs/modules/ROOT/pages/extending-contracts.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ contract ModifiedAccessControl is AccessControl {
6666

6767
The `super.revokeRole` statement at the end will invoke ``AccessControl``'s original version of `revokeRole`, the same code that would've run if there were no overrides in place.
6868

69-
NOTE: As of v3.0.0, `view` functions are not `virtual` in OpenZeppelin, and therefore cannot be overridden. We're considering https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2154[lifting this restriction] in an upcoming release. Let us know if this is something you care about!
70-
7169
[[using-hooks]]
7270
== Using Hooks
7371

0 commit comments

Comments
 (0)