Zksync-cli does not understand immutable variable while deploy proxy contract
I'm using zksync-cli to create project and compile proxy contract which inherist UUPSUpgradeable and got this error: Variable __self is assigned an initial value Move the assignment to the initializer
Checking on UUPS lib, i see address private immutable __self = address(this); By checking OZ docs, i got "It is still ok to define constant state variables, because the compiler does not reserve a storage slot for these variables, and every occurrence is replaced by the respective constant expression. So the following still works with OpenZeppelin Upgrades:" but in this way, this __self variable is immutable, and it got warning from zksync deployment.
What should i do? Look like zksync-cli does not understand the use of an immutable variable that is shared by all proxy instances here. openzeppelin-contracts-upgradeable: 5.0.2
Hello @Zohar97 , If this error is still occurring, note that the hardhat-zksync-upgradable plugin overrides the validation checks when OpenZeppelin Contracts v5 support is enabled, so this should no longer be treated as an error. If you're working in an existing project, try deleting the cache-zk/validation.json file (or the entire cache-zk/ folder) and recompile your contracts.
Closing due to staleness.