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
Updates the Hardhat Upgrades docs to cover using the plugin with viem, alongside the existing ethers usage.
Using with Hardhat – install snippet now shows the plugin plus either the ethers or viem peer dependencies; adds "if you are using viem" sections for scripts and tests (import from @openzeppelin/hardhat-upgrades/viem, contracts by name, viem contract instances) and a short note on how it differs from ethers.
Hardhat Upgrades API – reframes the intro for both ethers and viem, adds the viem setup/import, and notes viem's transaction-option differences.
Migration guide – corrects the viem note and checklist to point at the viem API.
Emphasizes throughout that viem users must import from @openzeppelin/hardhat-upgrades/viem, since the examples otherwise use ethers.
Review criteria: (1) ethers content unchanged except for added viem mentions or wording generalized to cover both; (2) viem content mirrors ethers except for parameter-type differences, viem-specific options, or ethers-only options unsupported by viem; (3) content unrelated to ethers/viem unchanged; (4) every ethers-specific description or code block has an equivalent viem one with only the minimal required adaptations.
Review notes: For each function, compared the viem and ethers tabs against the actual plugin source (option types and signatures) plus the viem type-check test, confirming the option lists, parameter types (address vs. contract instance), return types, and address types all match the real API and stay consistent between the two tabs. Tabs are balanced, and the pages were previewed to confirm they render and the ethers/viem toggle flips everything together.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation Pull Request
Summary
Updates the Hardhat Upgrades docs to cover using the plugin with viem, alongside the existing ethers usage.
@openzeppelin/hardhat-upgrades/viem, contracts by name, viem contract instances) and a short note on how it differs from ethers.Emphasizes throughout that viem users must import from
@openzeppelin/hardhat-upgrades/viem, since the examples otherwise use ethers.Type of Change
Related Issues
OpenZeppelin/openzeppelin-upgrades#1279
Checklist
pnpm run buildpnpm run check