How Is the Upgrade Function Typically Triggered in a UUPS Contract?
In a UUPS contract, the upgrade function (e.g. upgradeTo ) is typically implemented in the logic contract, not the proxy. The proxy delegates the call to this function.
This function is secured by a role-based access control or an owner check, ensuring only the authorized admin can trigger the upgrade, which points the proxy to a new logic contract address.