Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ERC1155PausableUpgradeable

Inherits: Initializable, ERC1155Upgradeable, PausableUpgradeable

ERC-1155 token with pausable token transfers, minting and burning. 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 pause mechanism of the contract unreachable, and thus unusable.

Functions

__ERC1155Pausable_init

function __ERC1155Pausable_init() internal onlyInitializing;

__ERC1155Pausable_init_unchained

function __ERC1155Pausable_init_unchained() internal onlyInitializing;

_update

*See ERC1155-_update. Requirements:

  • the contract must not be paused.*
function _update(address from, address to, uint256[] memory ids, uint256[] memory values)
    internal
    virtual
    override
    whenNotPaused;