Initializable.sol provides an initializer
modifier and a _disableInitializers()
internal function. I need help in understanding why a _disableInitializers()
might be needed if we already have a modifier which prevents the initializer function from being re-invoked.
Does this mean that the initializer function can be re-invoked in subsequent upgrades in the contract and this internal function prevents that?
Furthermore, the contract also provides a reinitializer(uint8 version)
modifier. Is this supposed to be used if we are trying to initialize an upgrade contract on the older contract?