Is the _disableInitializers()
function a replacement for the initializer
function in the constructor in this example:
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() initializer {}
I am trying to update my code to adhere to the most current best practices before deployment and when I replace the code block above with the block shown here, I get an undeclared identifier
error.
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
My compiler is :
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
After running the constructor, I I have an initialize()
function that initializes parent contracts.
I inherit these contracts:
contract MyContract is
Initializable,
AccessControlUpgradeable,
PausableUpgradeable,
ICallDelegator,
UUPSUpgradeable
{
Thanks in advance for any insights!