Description
tl;dr:
Request for the documentation to be more clear and specific.
Description:
https://docs.openzeppelin.com/upgrades-plugins/api-hardhat-upgrades
The current version of the documentation states the following:
kind: ("uups" | "transparent" | "beacon") The kind of proxy to deploy, upgrade or import, or the kind of proxy that the implementation will be used with. deployProxy() and upgradeProxy() only support the values "uups" | "transparent". Defaults to "transparent". See Transparent vs UUPS.
However, in practice it does not simply default to "transparent". There seems to be a whole lot going on within the library - including a step where the kind
of the contract is attempted to be inferred, possibly based on the contract ABI (I have not deep-dived into the library yet, but this is what I am making of the actual code).
I even attempted to deploy a UUPSUpgradeableProxy-compliant smart contract using deployProxy
and not specifying kind: 'uups'
(i.e. keeping it as undefined), and the library was able to infer the correct proxy kind (double-confirmed it by adding log statements to the local version of node_modules installed in my project).
I do see, however, that if the "proxy kind inference" step fails, the fallback value is set as "transparent". I also found this comment in OpenZeppelin Forums from an OpenZeppelin Team member stating something similar to what is written above.