// SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity >=0.8.20 <0.9.0; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {ERC20Bridgeable} from "@openzeppelin/community-contracts/contracts/token/ERC20/extensions/ERC20Bridgeable.sol"; import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; contract WrappedWITSuperchain is ERC20, ERC20Bridgeable, ERC20Permit { address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028; error Unauthorized(); constructor() ERC20("Wrapped WIT", "WIT") ERC20Permit("Wrapped/WIT") {} /** * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise. * * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain. */ function _checkTokenBridge(address caller) internal pure override { if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized(); } /// =============================================================================================================== /// --- ERC20 ----------------------------------------------------------------------------------------------------- function decimals() override public pure returns (uint8) { return 9; } }