ERC20Pausable
Title: ERC20Pausable
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Pausable.sol)
Stateless Diamond facet — ERC-20 whose token transfers can be paused.
Reuses the shared PausableLib pause state (no new storage/interface): the diamond also cuts in the
Pausable facet for the admin-gated pause()/unpause() control. OZ gates the _update hook (transfer,
mint and burn); Lattice's base ERC20 facet calls ERC20Lib directly with no facet-level _update, so the
gate is applied to the public movement surface (transfer/transferFrom). A composing facet that also
mints/burns while paused should apply PausableLib.checkNotPaused on those entrypoints too.
Hook model (D25, #234): this facet replaces ERC20's transfer/transferFrom, so it is mutually exclusive
with every other facet that replaces them (ERC20Votes, GovernedVault). A direct mover beside it
(ERC20Burnable, ERC20FlashMint, ERC20Crosschain, ERC20Wrapper, ERC7802, ERC4626, VaultCore, or a mint
facet over ERC20Capped's _mint) mints and burns while paused. The sanctioned mint/burn path is a facet
that calls PausableLib.checkNotPaused before ERC20Lib._mint/ERC20Lib._burn.
See docs/guides/selector-compatibility.md#token-extension-hook-model.
Notes:
- lattice-version: 0.1.0
- lattice-source: OpenZeppelin v5.6.1
Functions
transfer
Moves value to to, reverting with IPausable.EnforcedPause while paused (replaces base transfer).
function transfer(address to, uint256 value) public virtual returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| to | address | |
| value | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
transferFrom
Moves value from from to to, reverting with IPausable.EnforcedPause while paused (replaces base).
function transferFrom(address from, address to, uint256 value) public virtual returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| value | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
exportSelectors
ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).
Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches
forge inspect ERC20Pausable methodIdentifiers (alphabetical by signature); kept in exact parity by
ExportSelectorsParityTest. Chunks:
transfer(address,uint256) 0xa9059cbb
transferFrom(address,address,uint256) 0x23b872dd
function exportSelectors() external pure virtual returns (bytes memory selectors);Returns
| Name | Type | Description |
|---|---|---|
| selectors | bytes |