github.com/ethereum-optimism/optimism@v1.7.2/packages/contracts-bedrock/test/mocks/NextImpl.sol (about) 1 // SPDX-License-Identifier: MIT 2 pragma solidity 0.8.15; 3 4 import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; 5 6 /// @title NextImpl 7 /// @dev Used for testing a future upgrade beyond the current implementations. 8 // We include some variables so that we can sanity check accessing storage values after an upgrade. 9 contract NextImpl is Initializable { 10 // Initializable occupies the zero-th slot. 11 bytes32 slot1; 12 bytes32[19] __gap; 13 bytes32 slot21; 14 bytes32 public constant slot21Init = bytes32(hex"1337"); 15 16 function initialize(uint8 _init) public reinitializer(_init) { 17 // Slot21 is unused by an of our upgradeable contracts. 18 // This is used to verify that we can access this value after an upgrade. 19 slot21 = slot21Init; 20 } 21 }