I want to know if this is the intended behavior and if I should call initialize() of implementation contract myself.
I confirmed proxy contract has beend initialized already called and it is not callable anymore.
But implementation contract initialize() still callable and has not initialized.
Doesn't deployProxy() initialize the implementation contract automatically?
IIRC, I think you have got to initialize the implementation contract manually, and maybe you can invoke the _disableInitializers function in the constructor to automatically lock it when it is deployed, such as:
Come to think of it, is there no need to call initialize() in the implementation contract?
Is it correct that I don't need to call initialize because the implementation doesn't store the actual state of use?
Let me know if there's anything wrong
The plugins help call the initializer on the proxy, while the constructor as Skyge mentioned can be used to disable initializers on the implementation contract itself. See this post for more details.
The reason for disabling initializers on the implementation is explained here. Note that this still allows you to call your contract's initializer through the proxy address (which is what deployProxy() does).
I understand that the constructor should not be used to maintain the upgradeable.
So isn't this way upgradeable because it uses a constructor?
Please let me know if there is anything wrong with me. Thank you.