Source mirror · commit 369512f · 2026-10-26 · MIT · canonical repo: gitlab.com/jiapunk/upgrade-airlock
git clone https://upgrade-airlock.pages.dev/source/upgrade-airlock.git
upgrade-airlock / src / PausedImpl.sol
src/PausedImpl.sol17 lines · 658 bytes
1// SPDX-License-Identifier: MIT
2pragma solidity 0.8.37;
3
4import {DemoBTC} from "./DemoBTC.sol";
5
6/// @title PausedImpl
7/// @notice Break-glass target. Same storage layout as DemoBTC; views keep working, every balance
8/// change (transfer, transferFrom, mint, burn) reverts with TokenPaused().
9contract PausedImpl is DemoBTC {
10 error TokenPaused();
11
12 function _update(address from, address to, uint256 value) internal override {
13 // ERC20 never calls _update with both ends zero, so this always reverts in practice.
14 if (from != address(0) || to != address(0)) revert TokenPaused();
15 super._update(from, to, value);
16 }
17}