The documentation states:
This contract adds the required
upgradeTo
function, but also contains a built-in mechanism that will check on-chain, at the time of an upgrade, that the new implementation proposed preservesupgradeTo
.
You can find this here:
Question 1: Though, It's so vague how it checks ON-CHAIN
that new implementation contains upgradeTo
? all I can see is it calls proxiableUUID
and that's it...
What am I missing ? Thank you.
Question 2: Documentation also mentions:
This prevents upgrades to an implementation contract that wouldn’t contain the necessary upgrade mechanism, as it would lock the upgradeability of the proxy forever. This security mechanism can be bypassed by either of:
- Adding a flag mechanism in the implementation that will disable the upgrade function when triggered.
What do you mean by flag ? you mean overriding upgradeTo
and adding revert statement in it ?