You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
utkarsh1097
changed the title
Fix: Hardhat Upgrades API documentation update for deployProxy:kind
Fix: Hardhat Upgrades API documentation for deployProxy:kindJan 17, 2025
frangio
transferred this issue from OpenZeppelin/docs.openzeppelin.com
Jan 17, 2025
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 specifyingkind: '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.
The text was updated successfully, but these errors were encountered: