Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Hardhat Upgrades API documentation for deployProxy:kind #1112

Open
utkarsh1097 opened this issue Jan 17, 2025 · 0 comments
Open

Fix: Hardhat Upgrades API documentation for deployProxy:kind #1112

utkarsh1097 opened this issue Jan 17, 2025 · 0 comments

Comments

@utkarsh1097
Copy link

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.

@utkarsh1097 utkarsh1097 changed the title Fix: Hardhat Upgrades API documentation update for deployProxy:kind Fix: Hardhat Upgrades API documentation for deployProxy:kind Jan 17, 2025
@frangio frangio transferred this issue from OpenZeppelin/docs.openzeppelin.com Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant