Error: Contract is not upgrade safe
Variable __self is assigned an initial value
Move the assignment to the initializer
https://zpl.in/upgrades/error-004
Variable __self is immutable
Use a constant or mutable variable instead
https://zpl.in/upgrades/error-005
Use of delegatecall is not allowed
https://zpl.in/upgrades/error-002
Feb 27, 2022, 11:15 AM
Hey guys, I am getting these errors while deploying an upgradable contract via hardhat, I am using openzepellien. Can anyone help me fix them?
Feb 27, 2022, 11:16 AM
You cannot assign initial values to a variable on upgradable contracts. Have to do that via initialize()
Feb 27, 2022, 1:03 PM
Yes I am doing that
These errors are from the open zeppelin contracts
Feb 27, 2022, 1:04 PM
Are you importing any non-upgradable contracts?
Feb 27, 2022, 1:05 PM
No, every contract is upgradable
These errors are in uupsupgradable
I don't know if I should touch the audited open zeppelin contracts which I got after flattening the contract
Feb 27, 2022, 1:07 PM
Wierd.. Maybe try deploying the unflattened version?
And why are you using uups? I've only used transparent proxy before and worked just fine
Honestly I don't know what the difference is xD
Feb 27, 2022, 1:09 PM
Okay I will.
Do you know any deployed and verified uups contract on any blockchain?
And can anyone give me the address of it so I can tally the code ?
Feb 27, 2022, 1:11 PM
Not really. Do you know what's the advantage of using uups over transparent proxy?
Feb 27, 2022, 1:12 PM
Yes, I saw a video. It's more secure
Feb 27, 2022, 1:15 PM