12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // SPDX-License-Identifier: MIT
- pragma solidity ^0.8.0;
- import "../CountersImplUpgradeable.sol";
- import "../../proxy/utils/UUPSUpgradeable.sol";
- import "../../proxy/utils/Initializable.sol";
- contract UUPSUpgradeableMockUpgradeable is Initializable, CountersImplUpgradeable, UUPSUpgradeable {
- function __UUPSUpgradeableMock_init() internal onlyInitializing {
- }
- function __UUPSUpgradeableMock_init_unchained() internal onlyInitializing {
- }
- // Not having any checks in this function is dangerous! Do not do this outside tests!
- function _authorizeUpgrade(address) internal virtual override {}
- /**
- * This empty reserved space is put in place to allow future versions to add new
- * variables without shifting down storage in the inheritance chain.
- * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
- */
- uint256[50] private __gap;
- }
- contract UUPSUpgradeableUnsafeMockUpgradeable is Initializable, UUPSUpgradeableMockUpgradeable {
- function __UUPSUpgradeableUnsafeMock_init() internal onlyInitializing {
- }
- function __UUPSUpgradeableUnsafeMock_init_unchained() internal onlyInitializing {
- }
- function upgradeTo(address newImplementation) external virtual override {
- ERC1967UpgradeUpgradeable._upgradeToAndCall(newImplementation, bytes(""), false);
- }
- function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual override {
- ERC1967UpgradeUpgradeable._upgradeToAndCall(newImplementation, data, false);
- }
- /**
- * This empty reserved space is put in place to allow future versions to add new
- * variables without shifting down storage in the inheritance chain.
- * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
- */
- uint256[50] private __gap;
- }
|