// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.15; import "@openzeppelin/contracts/proxy/Proxy.sol"; import "@openzeppelin/contracts/utils/StorageSlot.sol"; contract MinimalProxy is Proxy { /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; constructor(address _impl) payable { StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = _impl; } function _implementation() internal view override returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } }