28 lines
630 B
Solidity
28 lines
630 B
Solidity
// SPDX-License-Identifier: Apache 2
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";
|
|
|
|
import "./CoreRelayer.sol";
|
|
|
|
contract CoreRelayerImplementation is CoreRelayer {
|
|
error ImplementationAlreadyInitialized();
|
|
|
|
function initialize() public virtual initializer {
|
|
// this function needs to be exposed for an upgrade to pass
|
|
}
|
|
|
|
modifier initializer() {
|
|
address impl = ERC1967Upgrade._getImplementation();
|
|
|
|
if (isInitialized(impl)) {
|
|
revert ImplementationAlreadyInitialized();
|
|
}
|
|
|
|
setInitialized(impl);
|
|
|
|
_;
|
|
}
|
|
}
|